From 3d1e919b722f3bbf92b2713e5578be7ed9903e87 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 28 Sep 2023 09:04:37 +0200 Subject: [PATCH 1/5] use caching from setup-python --- .github/workflows/pytest.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 109697960e..ea617e463b 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -42,18 +42,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - - name: Cache python dependencies - uses: actions/cache@v3 - id: pip_cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - if: ${{ steps.pip_cache.outputs.cache-hit != 'true' }} - name: Install python dependencies + cache: "pip" run: | python -m pip install --upgrade pip -r requirements-dev.txt pip install -e . From 5ade7ec94e109343d98c555029ce738da4714ba8 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 28 Sep 2023 09:06:44 +0200 Subject: [PATCH 2/5] fix syntax --- .github/workflows/pytest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index ea617e463b..34caa7b26d 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -43,6 +43,8 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: "pip" + + - name: Install dependencies run: | python -m pip install --upgrade pip -r requirements-dev.txt pip install -e . From 83c71831ec76c48ac82ca0d23c54a020a2065528 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 28 Sep 2023 09:22:20 +0200 Subject: [PATCH 3/5] invalidate nextflow cache once per month --- .github/workflows/pytest.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 34caa7b26d..3ecdceedc5 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -43,7 +43,6 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: "pip" - - name: Install dependencies run: | python -m pip install --upgrade pip -r requirements-dev.txt @@ -56,13 +55,17 @@ jobs: sudo apt remove git git-man sudo add-apt-repository --remove ppa:git-core/ppa sudo apt install git + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m')" >> $GITHUB_ENV - name: Cache Nextflow uses: actions/cache@v3 id: nfcore_cache with: path: ~/.nextflow - key: ${{ runner.os }}-nextflow-${{ hashFiles('nextflow.config') }} + # use date + key: ${{ runner.os }}-nextflow-${{ steps.date.outputs.date }} restore-keys: | ${{ runner.os }}-nextflow- From 58b68cfa6f8c18a81ba890ce110e4cf04b0d5f15 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 28 Sep 2023 14:23:02 +0200 Subject: [PATCH 4/5] fix github token --- .github/workflows/pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 3ecdceedc5..d343c3ed0b 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -21,7 +21,7 @@ concurrency: cancel-in-progress: true env: - GITHUB_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: pytest: From c47932a6862dfacd9e34ba23e3e59861ed33dd83 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 28 Sep 2023 14:23:26 +0200 Subject: [PATCH 5/5] remove caching of nextflow step --- .github/workflows/pytest.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index d343c3ed0b..388aaeb3d7 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -59,18 +59,7 @@ jobs: id: date run: echo "date=$(date +'%Y-%m')" >> $GITHUB_ENV - - name: Cache Nextflow - uses: actions/cache@v3 - id: nfcore_cache - with: - path: ~/.nextflow - # use date - key: ${{ runner.os }}-nextflow-${{ steps.date.outputs.date }} - restore-keys: | - ${{ runner.os }}-nextflow- - - - if: ${{ steps.nfcore_cache.outputs.cache-hit != 'true' }} - name: Install Nextflow + - name: Install Nextflow uses: nf-core/setup-nextflow@v1 with: version: "latest-everything"