From 74a0eb4bc9afb47b2fa647f5e98611e1af70418e Mon Sep 17 00:00:00 2001 From: mashehu Date: Mon, 3 Nov 2025 17:40:42 +0100 Subject: [PATCH 1/3] test runsOn's magic cache --- .github/workflows/create-lint-wf.yml | 32 +++++++++++++ .../create-test-lint-wf-template.yml | 43 +++++++++++++++++ .github/workflows/create-test-wf.yml | 35 ++++++++++++++ .github/workflows/pytest.yml | 46 ++++++++++++++++++- .github/workflows/sync.yml | 25 ++++++++++ 5 files changed, 180 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-lint-wf.yml b/.github/workflows/create-lint-wf.yml index 98fe676348..a004fd3fd1 100644 --- a/.github/workflows/create-lint-wf.yml +++ b/.github/workflows/create-lint-wf.yml @@ -26,6 +26,7 @@ jobs: runs-on: - runs-on=${{ github.run_id }}-make-test-worfklow - runner=4cpu-linux-x64 + - extras=s3-cache env: NXF_ANSI_LOG: false @@ -35,6 +36,9 @@ jobs: - "25.04.0" - "latest-everything" steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + - name: go to subdirectory and change nextflow workdir run: | mkdir -p create-lint-wf @@ -52,11 +56,39 @@ jobs: python-version: "3.14" cache: pip + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Install python dependencies run: | python -m pip install --upgrade pip pip install . + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-${{ matrix.NXF_VER }}-${{ matrix.NXF_VER == 'latest-everything' && steps.date.outputs.date || 'stable' }} + restore-keys: | + ${{ runner.os }}-nextflow-${{ matrix.NXF_VER }}- + + - name: Cache pre-commit + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: | + ${{ runner.os }}-precommit- + - name: run create-lint-wf uses: ./.github/actions/create-lint-wf with: diff --git a/.github/workflows/create-test-lint-wf-template.yml b/.github/workflows/create-test-lint-wf-template.yml index 4f7345e6a7..9576d83a4d 100644 --- a/.github/workflows/create-test-lint-wf-template.yml +++ b/.github/workflows/create-test-lint-wf-template.yml @@ -43,6 +43,7 @@ jobs: runs-on: - runs-on=${{ github.run_id }}-run-test-worfklow - runner=4cpu-linux-x64 + - extras=s3-cache needs: prepare-matrix env: NXF_ANSI_LOG: false @@ -55,6 +56,9 @@ jobs: fail-fast: false steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + - name: Check out source-code repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 @@ -62,12 +66,43 @@ jobs: uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: python-version: "3.14" + cache: "pip" + + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Install python dependencies run: | python -m pip install --upgrade pip pip install . + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-latest-everything-${{ steps.date.outputs.date }} + restore-keys: | + ${{ runner.os }}-nextflow-latest-everything- + + - name: Cache nf-test + uses: actions/cache@v4 + with: + path: | + ~/.nf-test + ~/.pdiff + key: ${{ runner.os }}-nftest-0.9.3 + restore-keys: | + ${{ runner.os }}-nftest- + - name: Install Nextflow uses: nf-core/setup-nextflow@v2 with: @@ -79,6 +114,14 @@ jobs: version: "0.9.3" install-pdiff: true + - name: Cache pre-commit + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: | + ${{ runner.os }}-precommit- + # Create template files - name: Create template skip ${{ matrix.TEMPLATE }} run: | diff --git a/.github/workflows/create-test-wf.yml b/.github/workflows/create-test-wf.yml index 7aea741b04..a1c1471e00 100644 --- a/.github/workflows/create-test-wf.yml +++ b/.github/workflows/create-test-wf.yml @@ -26,6 +26,7 @@ jobs: runs-on: - runs-on=${{ github.run_id }}-run-test-worfklow - runner=4cpu-linux-x64 + - extras=s3-cache env: NXF_ANSI_LOG: false @@ -35,6 +36,9 @@ jobs: - "25.04.0" - "latest-everything" steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + - name: go to working directory run: | mkdir -p create-test-wf @@ -48,12 +52,43 @@ jobs: uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: python-version: "3.14" + cache: "pip" + + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Install python dependencies run: | python -m pip install --upgrade pip pip install . + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-${{ matrix.NXF_VER }}-${{ matrix.NXF_VER == 'latest-everything' && steps.date.outputs.date || 'stable' }} + restore-keys: | + ${{ runner.os }}-nextflow-${{ matrix.NXF_VER }}- + + - name: Cache nf-test + uses: actions/cache@v4 + with: + path: | + ~/.nf-test + ~/.pdiff + key: ${{ runner.os }}-nftest-0.9.3 + restore-keys: | + ${{ runner.os }}-nftest- + - name: Install Nextflow uses: nf-core/setup-nextflow@v2 with: diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 93d94f091e..d0c18cbb6d 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -69,10 +69,14 @@ jobs: runs-on: - runs-on=${{ github.run_id }}-run-test - runner=4cpu-linux-x64 + - extras=s3-cache strategy: matrix: ${{ fromJson(needs.list_tests.outputs.tests) }} fail-fast: false # run all tests even if one fails steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + - name: go to subdirectory and change nextflow workdir run: | mkdir -p pytest @@ -89,6 +93,14 @@ jobs: cache: "pip" token: ${{ secrets.GITHUB_TOKEN }} + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Install dependencies run: | python -m pip install --upgrade pip -r requirements-dev.txt @@ -102,13 +114,33 @@ jobs: - name: Get current date id: date - run: echo "date=$(date +'%Y-%m')" >> $GITHUB_ENV + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-latest-${{ steps.date.outputs.date }} + restore-keys: | + ${{ runner.os }}-nextflow-latest- + + - name: Cache nf-test + uses: actions/cache@v4 + with: + path: | + ~/.nf-test + ~/.pdiff + key: ${{ runner.os }}-nftest-0.9.3 + restore-keys: | + ${{ runner.os }}-nftest- - name: Install Nextflow uses: nf-core/setup-nextflow@v2 - name: Install nf-test uses: nf-core/setup-nf-test@v1 + with: + version: "0.9.3" - name: move coveragerc file up run: | @@ -152,7 +184,11 @@ jobs: runs-on: - runs-on=${{ github.run_id }}-coverage - runner=2cpu-linux-x64 + - extras=s3-cache steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - name: Set up Python 3.14 uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 @@ -160,6 +196,14 @@ jobs: python-version: "3.14" cache: "pip" + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-coverage + restore-keys: | + ${{ runner.os }}-pip- + - name: Install coverage run: | python -m pip install --upgrade pip coverage diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index e37b894a46..aa1b68c3c8 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -58,10 +58,14 @@ jobs: runs-on: - runs-on=${{ github.run_id }}-sync - runner=4cpu-linux-x64 + - extras=s3-cache strategy: matrix: ${{fromJson(needs.get-pipelines.outputs.matrix)}} fail-fast: false steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 name: Check out nf-core/tools with: @@ -80,12 +84,33 @@ jobs: uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: python-version: "3.14" + cache: "pip" + + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Install python dependencies run: | python -m pip install --upgrade pip pip install . + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-latest-everything-${{ steps.date.outputs.date }} + restore-keys: | + ${{ runner.os }}-nextflow-latest-everything- + - name: Install Nextflow uses: nf-core/setup-nextflow@v2 with: From d5da19f9d2bf68775d8b684f7de6cec31be5659e Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Mon, 3 Nov 2025 16:42:37 +0000 Subject: [PATCH 2/3] [automated] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ee30f079..7649269586 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - add optional link to blogpost to sync PR ([#3852](https://github.com/nf-core/tools/pull/3852)) - update multiqc version to fix utils test ([#3853](https://github.com/nf-core/tools/pull/3853)) - Update pre-commit hook astral-sh/ruff-pre-commit to v0.14.3 ([#3861](https://github.com/nf-core/tools/pull/3861)) +- Use runsOn's magic cache to speed up CI tests ([#3867](https://github.com/nf-core/tools/pull/3867)) ### Template From 663772d15e1facd7d3fb28a578d789123a9143a8 Mon Sep 17 00:00:00 2001 From: mashehu Date: Mon, 3 Nov 2025 21:07:55 +0100 Subject: [PATCH 3/3] add cache pre-heating step --- .github/workflows/create-lint-wf.yml | 68 ++++++++++++++++ .../create-test-lint-wf-template.yml | 80 ++++++++++++++++++- .github/workflows/create-test-wf.yml | 71 ++++++++++++++++ .github/workflows/pytest.yml | 64 ++++++++++++++- .github/workflows/sync.yml | 53 +++++++++++- 5 files changed, 333 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-lint-wf.yml b/.github/workflows/create-lint-wf.yml index a004fd3fd1..22529fe78a 100644 --- a/.github/workflows/create-lint-wf.yml +++ b/.github/workflows/create-lint-wf.yml @@ -22,11 +22,79 @@ concurrency: cancel-in-progress: true jobs: + prepare-cache: + name: Pre-build caches for lint jobs + runs-on: + - runs-on=${{ github.run_id }}-prepare-cache + - runner=2cpu-linux-x64 + - extras=s3-cache + strategy: + matrix: + NXF_VER: + - "25.04.0" + - "latest-everything" + steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + name: Check out source-code repository + + - name: Set up Python 3.14 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + cache: pip + + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install . + + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-${{ matrix.NXF_VER }}-${{ matrix.NXF_VER == 'latest-everything' && steps.date.outputs.date || 'stable' }} + restore-keys: | + ${{ runner.os }}-nextflow-${{ matrix.NXF_VER }}- + + - name: Cache pre-commit + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: | + ${{ runner.os }}-precommit- + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: ${{ matrix.NXF_VER }} + + - name: Install pre-commit hooks + run: | + pip install pre-commit + pre-commit install-hooks + MakeTestWorkflow: runs-on: - runs-on=${{ github.run_id }}-make-test-worfklow - runner=4cpu-linux-x64 - extras=s3-cache + needs: prepare-cache env: NXF_ANSI_LOG: false diff --git a/.github/workflows/create-test-lint-wf-template.yml b/.github/workflows/create-test-lint-wf-template.yml index 9576d83a4d..72a496d11f 100644 --- a/.github/workflows/create-test-lint-wf-template.yml +++ b/.github/workflows/create-test-lint-wf-template.yml @@ -39,12 +39,90 @@ jobs: echo "matrix=$(yq '.[].features | keys | filter(. != "github") | filter(. != "is_nfcore") | filter(. != "test_config")' nf_core/pipelines/create/template_features.yml | \ yq 'flatten | tojson(0)' -)" >> $GITHUB_OUTPUT + prepare-cache: + name: Pre-build caches for matrix jobs + runs-on: + - runs-on=${{ github.run_id }}-prepare-cache + - runner=2cpu-linux-x64 + - extras=s3-cache + steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + + - name: Check out source-code repository + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + + - name: Set up Python 3.14 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + cache: "pip" + + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install . + + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-latest-everything-${{ steps.date.outputs.date }} + restore-keys: | + ${{ runner.os }}-nextflow-latest-everything- + + - name: Cache nf-test + uses: actions/cache@v4 + with: + path: | + ~/.nf-test + ~/.pdiff + key: ${{ runner.os }}-nftest-0.9.3 + restore-keys: | + ${{ runner.os }}-nftest- + + - name: Cache pre-commit + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: | + ${{ runner.os }}-precommit- + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: latest-everything + + - name: Install nf-test + uses: nf-core/setup-nf-test@v1 + with: + version: "0.9.3" + install-pdiff: true + + - name: Install pre-commit hooks + run: | + pip install pre-commit + pre-commit install-hooks + RunTestWorkflow: runs-on: - runs-on=${{ github.run_id }}-run-test-worfklow - runner=4cpu-linux-x64 - extras=s3-cache - needs: prepare-matrix + needs: [prepare-matrix, prepare-cache] env: NXF_ANSI_LOG: false diff --git a/.github/workflows/create-test-wf.yml b/.github/workflows/create-test-wf.yml index a1c1471e00..91bba97948 100644 --- a/.github/workflows/create-test-wf.yml +++ b/.github/workflows/create-test-wf.yml @@ -22,11 +22,82 @@ concurrency: cancel-in-progress: true jobs: + prepare-cache: + name: Pre-build caches for test jobs + runs-on: + - runs-on=${{ github.run_id }}-prepare-cache + - runner=2cpu-linux-x64 + - extras=s3-cache + strategy: + matrix: + NXF_VER: + - "25.04.0" + - "latest-everything" + steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + name: Check out source-code repository + + - name: Set up Python 3.14 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + cache: "pip" + + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install . + + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-${{ matrix.NXF_VER }}-${{ matrix.NXF_VER == 'latest-everything' && steps.date.outputs.date || 'stable' }} + restore-keys: | + ${{ runner.os }}-nextflow-${{ matrix.NXF_VER }}- + + - name: Cache nf-test + uses: actions/cache@v4 + with: + path: | + ~/.nf-test + ~/.pdiff + key: ${{ runner.os }}-nftest-0.9.3 + restore-keys: | + ${{ runner.os }}-nftest- + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: ${{ matrix.NXF_VER }} + + - name: Install nf-test + uses: nf-core/setup-nf-test@v1 + with: + version: "0.9.3" + install-pdiff: true + RunTestWorkflow: runs-on: - runs-on=${{ github.run_id }}-run-test-worfklow - runner=4cpu-linux-x64 - extras=s3-cache + needs: prepare-cache env: NXF_ANSI_LOG: false diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index d0c18cbb6d..cdc5fcb607 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -62,9 +62,71 @@ jobs: outputs: tests: ${{ steps.list_tests.outputs.tests }} + prepare-cache: + name: Pre-build caches for test jobs + runs-on: + - runs-on=${{ github.run_id }}-prepare-cache + - runner=2cpu-linux-x64 + - extras=s3-cache + steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + name: Check out source-code repository + + - name: Set up Python 3.14 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + cache: "pip" + + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install dependencies + run: | + python -m pip install --upgrade pip -r requirements-dev.txt + pip install -e . + + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-latest-${{ steps.date.outputs.date }} + restore-keys: | + ${{ runner.os }}-nextflow-latest- + + - name: Cache nf-test + uses: actions/cache@v4 + with: + path: | + ~/.nf-test + ~/.pdiff + key: ${{ runner.os }}-nftest-0.9.3 + restore-keys: | + ${{ runner.os }}-nftest- + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + + - name: Install nf-test + uses: nf-core/setup-nf-test@v1 + with: + version: "0.9.3" + test: name: Run ${{matrix.test}} with Python ${{ needs.setup.outputs.python-version }} on ${{ needs.setup.outputs.runner }} - needs: [setup, list_tests] + needs: [setup, list_tests, prepare-cache] if: ${{ needs.setup.outputs.run-tests }} runs-on: - runs-on=${{ github.run_id }}-run-test diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index aa1b68c3c8..174c29a195 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -53,8 +53,59 @@ jobs: fi echo "matrix=$(cat pipeline_names.json)" >> $GITHUB_OUTPUT + prepare-cache: + name: Pre-build caches for sync jobs + runs-on: + - runs-on=${{ github.run_id }}-prepare-cache + - runner=2cpu-linux-x64 + - extras=s3-cache + steps: + - name: Enable Magic Cache + uses: runs-on/action@v2 + + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + name: Check out nf-core/tools + with: + ref: ${{ github.ref_name }} + + - name: Set up Python 3.14 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + cache: "pip" + + - name: Cache Python dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install . + + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Cache Nextflow assets + uses: actions/cache@v4 + with: + path: ~/.nextflow + key: ${{ runner.os }}-nextflow-latest-everything-${{ steps.date.outputs.date }} + restore-keys: | + ${{ runner.os }}-nextflow-latest-everything- + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: "latest-everything" + sync: - needs: get-pipelines + needs: [get-pipelines, prepare-cache] runs-on: - runs-on=${{ github.run_id }}-sync - runner=4cpu-linux-x64