From c39bb1d91bd3ba7e955d9864c5ae15b4f3a2869c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 17 Oct 2025 16:36:40 +0100 Subject: [PATCH] [Test] Download corpus before Docker Compose starts Move corpus download step before Docker Compose to avoid permission issues with data directory created by Docker --- .github/workflows/integration-test.yml | 46 +++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index dafc56878d..e25a1abd31 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -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: | -- 2.47.3