Run PR CI via docker build/run without compose networks
All checks were successful
CI / ci (pull_request) Successful in 43s

This commit is contained in:
Codex_B
2026-02-28 13:05:28 +00:00
parent 11b89e9e1c
commit 2cb1e622e2
3 changed files with 29 additions and 20 deletions

View File

@@ -11,25 +11,22 @@ jobs:
ci:
runs-on: ubuntu-latest
env:
COMPOSE_PROJECT_NAME: gh-pr-${{ github.event.pull_request.number || github.run_id }}
CI_IMAGE: nohype-ci:${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- name: Clean previous compose project
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml down -v --remove-orphans || true
- name: Build
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml build
run: docker build -t "$CI_IMAGE" .
- name: Ruff
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm --no-deps web ruff check .
run: docker run --rm "$CI_IMAGE" ruff check .
- name: Mypy
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm --no-deps web mypy apps config
run: docker run --rm "$CI_IMAGE" mypy apps config
- name: Pytest
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm web pytest
run: docker run --rm -e DATABASE_URL=sqlite:////tmp/ci.sqlite3 "$CI_IMAGE" pytest
- name: Final cleanup
- name: Remove CI image
if: always()
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml down -v --remove-orphans || true
run: docker image rm -f "$CI_IMAGE" || true