meal-order-manager/.github/workflows/ci.yml
Adam Moussa 3e9a1c60bf
feat(api): serve meals on ECS Fargate instead of Lambda
Keep the Flask app always-on with in-process jobs so CloudFront no longer fronts a cold-start API Gateway.
2026-09-21 14:37:48 -04:00

72 lines
1.9 KiB
YAML

name: CI
on:
pull_request:
branches: [main]
merge_group:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1.x
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.x
with:
python-version: "3.12.14"
- name: Compile Python sources
run: |
pip install -r requirements-api.txt -r src/shared/requirements.txt
python -m compileall src
template-js:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1.x
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24.19.0"
cache: npm
- name: Install JavaScript tooling
run: npm ci
- name: Check template JavaScript
run: npm run check:templates
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1.x
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.x
with:
python-version: "3.12.14"
- name: Install Python dependencies
shell: bash
run: |
pip install pytest
pip install -r requirements-api.txt
while IFS= read -r -d '' req; do
pip install -r "$req"
done < <(find . -name requirements.txt -not -path './.aws-sam/*' -print0)
- name: Install Playwright Chromium
run: playwright install --with-deps chromium
- name: Run tests
run: pytest