diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml index 7c35ed1..0a8a6d7 100644 --- a/.forgejo/workflows/test.yaml +++ b/.forgejo/workflows/test.yaml @@ -7,16 +7,25 @@ on: jobs: test: - needs: build runs-on: ubuntu-latest - container: - image: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_NAME }}:latest - options: --entrypoint "" steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Run Django tests + - 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 run: | - python -m hub migrate --noinput - python -m hub test --verbosity=2 \ No newline at end of file + docker run --rm \ + -v $(pwd):/app \ + -w /app \ + website:test \ + sh -c 'python -m hub migrate --noinput && python -m hub test --verbosity=2' \ No newline at end of file