2025-06-20 14:47:12 +02:00
|
|
|
name: Django Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["*"]
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2025-06-20 14:50:34 +02:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Build Docker image (local only)
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: false
|
|
|
|
tags: website:test
|
|
|
|
|
|
|
|
- name: Run Django tests in container
|
2025-06-20 14:47:12 +02:00
|
|
|
run: |
|
2025-06-20 14:50:34 +02:00
|
|
|
docker run --rm \
|
|
|
|
-v $(pwd):/app \
|
|
|
|
-w /app \
|
|
|
|
website:test \
|
|
|
|
sh -c 'python -m hub migrate --noinput && python -m hub test --verbosity=2'
|