]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Test] Download corpus before Docker Compose starts
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 17 Oct 2025 15:36:40 +0000 (16:36 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 17 Oct 2025 15:36:40 +0000 (16:36 +0100)
Move corpus download step before Docker Compose to avoid
permission issues with data directory created by Docker

.github/workflows/integration-test.yml

index dafc56878dae119e2a39d9a78d418c09a997b5f3..e25a1abd313398b1a968e4d48e131e07a497a2a2 100644 (file)
@@ -120,6 +120,29 @@ jobs:
           echo "Keys generated successfully"
           cat .env.keys
 
+      - name: Download email corpus
+        working-directory: test/integration
+        run: |
+          # Use provided URL or default corpus from rspamd-test-corpus
+          CORPUS_URL="${{ github.event.inputs.corpus_url }}"
+          if [ -z "$CORPUS_URL" ]; then
+            # Default: use latest release from rspamd-test-corpus
+            CORPUS_URL="https://github.com/rspamd/rspamd-test-corpus/releases/latest/download/rspamd-test-corpus.zip"
+          fi
+
+          echo "Downloading corpus from: $CORPUS_URL"
+
+          # Create data directory for corpus
+          mkdir -p data
+
+          curl -L "$CORPUS_URL" -o data/corpus.zip
+
+          # Extract corpus
+          unzip data/corpus.zip -d data/
+
+          # The archive contains a 'corpus' directory, so we should have data/corpus/ now
+          ls -lh data/corpus/
+
       - name: Update Docker Compose to use local build
         working-directory: test/integration
         run: |
@@ -188,29 +211,6 @@ jobs:
           docker compose logs rspamd
           exit 1
 
-      - name: Download email corpus
-        working-directory: test/integration
-        run: |
-          # Use provided URL or default corpus from rspamd-test-corpus
-          CORPUS_URL="${{ github.event.inputs.corpus_url }}"
-          if [ -z "$CORPUS_URL" ]; then
-            # Default: use latest release from rspamd-test-corpus
-            CORPUS_URL="https://github.com/rspamd/rspamd-test-corpus/releases/latest/download/rspamd-test-corpus.zip"
-          fi
-
-          echo "Downloading corpus from: $CORPUS_URL"
-
-          # Create data directory for corpus
-          mkdir -p data
-
-          curl -L "$CORPUS_URL" -o data/corpus.zip
-
-          # Extract corpus
-          unzip data/corpus.zip -d data/
-
-          # The archive contains a 'corpus' directory, so we should have data/corpus/ now
-          ls -lh data/corpus/
-
       - name: Run integration test
         working-directory: test/integration
         run: |