Skip to content

Modify CloudFront rewrite to serve favicons #1821

Modify CloudFront rewrite to serve favicons

Modify CloudFront rewrite to serve favicons #1821

Workflow file for this run

name: validate
concurrency:
group: validate
cancel-in-progress: true
on:
push:
branches:
- '**'
- '!main'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
detect-changes:
runs-on: ubuntu-latest
environment: staging
outputs:
validate-iac: ${{ steps.check.outputs.validate-iac }}
validate-backend: ${{ steps.check.outputs.validate-backend }}
validate-frontend: ${{ steps.check.outputs.validate-frontend }}
validate-pulumi: ${{ steps.check.outputs.validate-pulumi }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: check
with:
filters: |
validate-backend:
- 'backend/**'
- '.github/workflows/validate.yml'
validate-frontend:
- 'frontend/**'
- '.github/workflows/validate.yml'
validate-pulumi:
- 'pulumi/**'
- '.github/workflows/validate.yml'
validate-backend:
needs: detect-changes
runs-on: ubuntu-latest
environment: staging
if: needs.detect-changes.outputs.validate-backend == 'true'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
- name: Install dependencies
run: |
cd ./backend
python -m pip install --upgrade pip
python -m pip install -e .'[test]'
- name: Test with pytest
working-directory: ./backend
run: |
current_dir=$(pwd)
coverage run --data-file $current_dir/.coverage -m pytest --disable-warnings -s
- name: Generate code coverage report
working-directory: ./backend
continue-on-error: true
run: |
coverage report
- name: Backend lint check
run: |
cd ./backend && ruff check
- name: Backend formatting check
run: |
cd ./backend && ruff format
validate-frontend:
needs: detect-changes
runs-on: ubuntu-latest
environment: staging
if: needs.detect-changes.outputs.validate-frontend == 'true'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: 'frontend/package-lock.json'
- name: Install dependencies
run: |
cd ./frontend
npm install
- name: Frontend lint check
run: |
cd ./frontend && npm run lint
- name: Build frontend
run: |
cd ./frontend && npm run build
- name: Test with vitest
run: |
cd ./frontend && npm run test -- --run
validate-pulumi:
needs: detect-changes
runs-on: ubuntu-latest
environment: staging
if: needs.detect-changes.outputs.validate-pulumi == 'true'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
- name: Install dependencies
run: |
cd ./pulumi
python -m pip install --upgrade pip
python -m pip install -e .'[dev]'
- name: "Ruff: Format checks"
run: |
cd ./pulumi
ruff format
- name: "Ruff: Style/sanity checks"
run: |
cd ./pulumi
ruff check