@@ -25,8 +25,57 @@ concurrency:
2525 cancel-in-progress : true
2626permissions : {}
2727jobs :
28+ prepare-mulled-cache :
29+ name : Prepare mulled resolution cache
30+ runs-on : ubuntu-latest
31+ steps :
32+ - name : Select weekly cache
33+ run : echo "MULLED_CACHE_WEEK=$(date -u +%G-%V)" >> "$GITHUB_ENV"
34+ - name : Restore Biocontainers repository index
35+ id : restore-mulled-cache
36+ uses : actions/cache/restore@v6.1.0
37+ with :
38+ key : biocontainers-repository-index-${{ env.MULLED_CACHE_WEEK }}
39+ path : ' ${{ runner.temp }}/mulled-resolution-seed'
40+ - name : Check out Galaxy for mulled-cache
41+ if : steps.restore-mulled-cache.outputs.cache-hit != 'true'
42+ uses : actions/checkout@v7.0.0
43+ with :
44+ path : ' galaxy cache source'
45+ persist-credentials : false
46+ - name : Fetch Biocontainers repository index
47+ id : fetch-mulled-cache
48+ if : steps.restore-mulled-cache.outputs.cache-hit != 'true'
49+ continue-on-error : true
50+ env :
51+ SEED_DIRECTORY : ' ${{ runner.temp }}/mulled-resolution-seed'
52+ run : |
53+ python3 'galaxy cache source/lib/galaxy/tool_util/deps/mulled/mulled_cache.py' \
54+ --namespace biocontainers \
55+ --output "$SEED_DIRECTORY/biocontainers.json"
56+ - name : Save Biocontainers repository index
57+ if : steps.restore-mulled-cache.outputs.cache-hit != 'true' && steps.fetch-mulled-cache.outcome == 'success'
58+ uses : actions/cache/save@v6.1.0
59+ with :
60+ key : biocontainers-repository-index-${{ env.MULLED_CACHE_WEEK }}
61+ path : ' ${{ runner.temp }}/mulled-resolution-seed'
62+ - name : Create fallback seed
63+ if : steps.fetch-mulled-cache.outcome == 'failure'
64+ env :
65+ SEED_DIRECTORY : ' ${{ runner.temp }}/mulled-resolution-seed'
66+ run : |
67+ mkdir -p "$SEED_DIRECTORY"
68+ echo '{"namespace":"biocontainers","repositories":[]}' > "$SEED_DIRECTORY/biocontainers.json"
69+ - name : Upload mulled resolution cache seed
70+ uses : actions/upload-artifact@v7
71+ with :
72+ name : mulled-resolution-cache-seed
73+ path : ' ${{ runner.temp }}/mulled-resolution-seed/biocontainers.json'
74+ retention-days : 1
75+
2876 test :
2977 name : Test
78+ needs : prepare-mulled-cache
3079 runs-on : ubuntu-latest
3180 strategy :
3281 fail-fast : false
@@ -63,9 +112,18 @@ jobs:
63112 python-version : ${{ matrix.python-version }}
64113 - name : Install Python
65114 run : uv python install
115+ - name : Download mulled resolution cache seed
116+ uses : actions/download-artifact@v8
117+ with :
118+ name : mulled-resolution-cache-seed
119+ path : ' ${{ runner.temp }}/mulled-resolution-seed'
66120 - name : Install Apptainer's singularity
67121 uses : ' ./galaxy root/.github/actions/install_apptainer'
68122 - name : Run tests
123+ env :
124+ GALAXY_TEST_MULLED_RESOLUTION_CACHE_SEED : ' ${{ runner.temp }}/mulled-resolution-seed/biocontainers.json'
125+ GALAXY_CONFIG_OVERRIDE_MULLED_RESOLUTION_CACHE_DATA_DIR : ' ${{ runner.temp }}/mulled-resolution-cache/data'
126+ GALAXY_CONFIG_OVERRIDE_MULLED_RESOLUTION_CACHE_LOCK_DIR : ' ${{ runner.temp }}/mulled-resolution-cache/locks'
69127 run : |
70128 . .ci/minikube-test-setup/start_services.sh
71129 ./run_tests.sh --coverage -integration test/integration -- --num-shards=4 --shard-id=${{ matrix.chunk }}
0 commit comments