Skip to content

Commit

Permalink
combine cicd tests with caching
Browse files Browse the repository at this point in the history
  • Loading branch information
leifdenby committed Jul 11, 2024
1 parent 5aaa239 commit 66c3b03
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 43 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci-pdm-install-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ jobs:
pdm run python -c "import torch; print(torch.__version__)"
pdm run python -c "import torch; assert torch.__version__.endswith('+cpu')"
- name: Load cache data
uses: actions/cache/restore@v4
with:
path: data
key: ${{ runner.os }}-meps-reduced-example-data-v0.1.0
restore-keys: |
${{ runner.os }}-meps-reduced-example-data-v0.1.0
- name: Run tests
run: |
pdm run pytest
- name: Save cache data
uses: actions/cache/save@v4
with:
path: data
key: ${{ runner.os }}-meps-reduced-example-data-v0.1.0
14 changes: 14 additions & 0 deletions .github/workflows/ci-pip-install-and-test-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ jobs:
python -c "import torch; print(torch.__version__)"
python -c "import torch; assert not torch.__version__.endswith('+cpu')"
- name: Load cache data
uses: actions/cache/restore@v4
with:
path: data
key: ${{ runner.os }}-meps-reduced-example-data-v0.1.0
restore-keys: |
${{ runner.os }}-meps-reduced-example-data-v0.1.0
- name: Run tests
run: |
python -m pytest
- name: Save cache data
uses: actions/cache/save@v4
with:
path: data
key: ${{ runner.os }}-meps-reduced-example-data-v0.1.0
14 changes: 14 additions & 0 deletions .github/workflows/ci-pip-install-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ jobs:
python -c "import torch; print(torch.__version__)"
python -c "import torch; assert torch.__version__.endswith('+cpu')"
- name: Load cache data
uses: actions/cache/restore@v4
with:
path: data
key: ${{ runner.os }}-meps-reduced-example-data-v0.1.0
restore-keys: |
${{ runner.os }}-meps-reduced-example-data-v0.1.0
- name: Run tests
run: |
python -m pytest
- name: Save cache data
uses: actions/cache/save@v4
with:
path: data
key: ${{ runner.os }}-meps-reduced-example-data-v0.1.0
43 changes: 0 additions & 43 deletions .github/workflows/run_tests.yml

This file was deleted.

0 comments on commit 66c3b03

Please sign in to comment.