proposal-system/.github/workflows/ci.yaml
Adam Moussa 456f0d4252 Fix CI failures: unused Python imports and CDK synth asset path
CDK synth job needs the .NET API published first so the Lambda asset
path exists. Python lint had 3 unused imports in pdf-generate.
2026-05-17 12:49:41 -04:00

82 lines
1.8 KiB
YAML

name: CI
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
dotnet:
name: .NET Build & Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- run: dotnet restore ProposalSystem.sln
- run: dotnet build ProposalSystem.sln --no-restore --configuration Release
- run: dotnet test ProposalSystem.sln --no-build --configuration Release
web:
name: Web Frontend Check
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: web/package-lock.json
- run: npm ci
- run: npx tsc --noEmit
python:
name: Python Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install ruff
- run: ruff check lambdas/
- run: ruff format --check lambdas/
infra:
name: CDK Synth
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Publish .NET API (required for CDK asset path)
run: dotnet publish api/src/ProposalSystem.Api/ProposalSystem.Api.csproj --configuration Release --runtime linux-arm64 --self-contained
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: infra/package-lock.json
- run: npm ci
working-directory: infra
- run: npx cdk synth
working-directory: infra