perf(ci): combine test and build into single job

Eliminates duplicate job overhead:
- No separate job startup time
- No duplicate code checkout
- No runner scheduling delay
- Runs sequentially in same environment

Docker build still compiles from scratch (Docker isolation) but saves ~2-3min
in job overhead. Next step: optimize Dockerfile for better layer caching.
This commit is contained in:
Graham McIntire 2026-03-05 19:17:13 -06:00
parent 0bd82678ef
commit f3758191fd
No known key found for this signature in database

View file

@ -15,7 +15,7 @@ concurrency:
cancel-in-progress: true
jobs:
test:
test-and-build:
runs-on: ubuntu-22.04
env:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/towerops_test
@ -73,13 +73,6 @@ jobs:
mix compile --warnings-as-errors
mix test --warnings-as-errors --max-cases 3
build:
runs-on: ubuntu-22.04
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with: