From: Vsevolod Stakhov Date: Fri, 17 Oct 2025 15:36:40 +0000 (+0100) Subject: [Test] Download corpus before Docker Compose starts X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c39bb1d91bd3ba7e955d9864c5ae15b4f3a2869c;p=thirdparty%2Frspamd.git [Test] Download corpus before Docker Compose starts Move corpus download step before Docker Compose to avoid permission issues with data directory created by Docker --- 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: |