Browse Source

CI: integration suite fits the Docker Build job and names hung tests

- Run it with -n auto and a 60 s per-test timeout on the runner instead
  of the compose file's -n 30, and give the job 40 minutes; with twice
  the tests it ran past 20 and was cancelled before its summary
maziggy 1 day ago
parent
commit
07245538e0
1 changed files with 12 additions and 2 deletions
  1. 12 2
      .github/workflows/ci.yml

+ 12 - 2
.github/workflows/ci.yml

@@ -489,7 +489,8 @@ jobs:
     name: Docker Build
     name: Docker Build
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     if: github.event_name == 'push' || github.event.pull_request.user.login != github.repository_owner
     if: github.event_name == 'push' || github.event.pull_request.user.login != github.repository_owner
-    timeout-minutes: 20
+    # The integration suite alone takes well over 20 minutes on a runner.
+    timeout-minutes: 40
     needs: [backend-tests, frontend-build]
     needs: [backend-tests, frontend-build]
     steps:
     steps:
       - uses: actions/checkout@v6
       - uses: actions/checkout@v6
@@ -540,8 +541,17 @@ jobs:
       - name: Build integration test runner
       - name: Build integration test runner
         run: docker compose -f docker-compose.test.yml build integration-test-runner
         run: docker compose -f docker-compose.test.yml build integration-test-runner
 
 
+      # The compose command's -n 30 fits the local test host, not a 4-CPU
+      # runner: there it was slower and tests ran out of time. --timeout
+      # turns a hung test into a failure with its name instead of a cancel.
       - name: Run integration test suite
       - name: Run integration test suite
-        run: docker compose -f docker-compose.test.yml run --rm integration-test-runner
+        run: |
+          docker compose -f docker-compose.test.yml run --rm integration-test-runner \
+            pytest backend/tests/integration/ \
+              --tb=short \
+              --timeout=60 --timeout-method=thread \
+              -p no:cacheprovider \
+              -n auto
 
 
       - name: Show logs on failure
       - name: Show logs on failure
         if: failure()
         if: failure()