Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): add cache capabilities. #126

Merged
merged 9 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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: |
Expand All @@ -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
Expand Down
Loading