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.
This commit is contained in:
Adam Moussa 2026-05-17 12:49:41 -04:00
parent bdd4053585
commit 456f0d4252
2 changed files with 11 additions and 6 deletions

View file

@ -60,12 +60,16 @@ jobs:
infra:
name: CDK Synth
runs-on: ubuntu-latest
defaults:
run:
working-directory: infra
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
@ -73,4 +77,6 @@ jobs:
cache-dependency-path: infra/package-lock.json
- run: npm ci
working-directory: infra
- run: npx cdk synth
working-directory: infra

View file

@ -6,17 +6,16 @@ Triggered via SQS when an admin requests PDF generation.
import json
import os
import tempfile
from datetime import datetime
from io import BytesIO
import boto3
import httpx
from reportlab.lib import colors
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.lib.enums import TA_CENTER, TA_RIGHT
from reportlab.lib.pagesizes import letter
from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet
from reportlab.lib.units import inch, mm
from reportlab.lib.units import inch
from reportlab.platypus import (
Paragraph,
SimpleDocTemplate,