diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 9180d6f2..a8b2e33b 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -6,8 +6,13 @@ on: pull_request: branches: [ "master" ] + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: PYTHON_VERSION: "3.10" BART_VERSION: "0.8.00" diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml index 72b708a4..6a29d204 100644 --- a/.github/workflows/test-ci.yml +++ b/.github/workflows/test-ci.yml @@ -6,8 +6,13 @@ on: pull_request: branches: [ "master" ] + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: PYTHON_VERSION: "3.10" BART_VERSION: "0.8.00" @@ -166,6 +171,13 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: pip + - name: Restore cached brainweb-dl directory + uses: actions/cache/restore@v4 + id: cache-restore + with: + path: ~/.cache/brainweb + key: ${{ runner.os }}-Brainweb + - name: Install Python deps shell: bash run: | @@ -179,6 +191,13 @@ jobs: export COVERAGE_FILE=coverage_plots pytest examples tests -k="not operators" --cov --cov-branch --cov-report=term + - name: Cache brainweb-dl directory + uses: actions/cache/save@v4 + if: ${{ steps.cache-restore.outputs.cache-hit != 'true' }} + with: + path: ~/.cache/brainweb + key: ${{ runner.os }}-Brainweb + - name: Upload coverage if: success() uses: actions/upload-artifact@v3