Skip to content

Commit

Permalink
MAINT: Test result caching [skip circle]
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jan 24, 2024
1 parent 9055e9c commit d9f4224
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
56 changes: 56 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: 'Tests'
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
push:
branches:
- '*'
pull_request:
branches:
- '*'

permissions:
contents: read

jobs:
caching:
name: 'caching on ${{ matrix.os }}'
timeout-minutes: 30
continue-on-error: true
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
steps:
- uses: actions/checkout@v4
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -ve .[tests]
- uses: actions/cache@v4
with:
key: ds001971
path: ~/mne_data/ds001971
- run: pytest mne_bids_pipeline --download -k ds001971
- run: pytest mne_bids_pipeline --cov-append -k ds001971 # uses "hash" method
timeout-minutes: 1
- uses: actions/cache@v4
with:
key: ds003392
path: ~/mne_data/ds003392
- run: pytest --cov-append --download -k ds003392 mne_bids_pipeline/
- run: pytest --cov-append -k ds003392 mne_bids_pipeline/ # uses "mtime" method
timeout-minutes: 1
- uses: codecov/codecov-action@v3
if: success()
1 change: 1 addition & 0 deletions docs/source/v1.6.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
### :medical_symbol: Code health

- The package build backend has been switched from `setuptools` to `hatchling`. (#825 by @hoechenberger)
- Code caching is now tested using GitHub Actions (#836 by @larsoner)
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ tests = [
"mkdocstrings-python",
"mike",
"jinja2",
"black", # function signature formatting
"livereload",
"openneuro-py >= 2022.2.0",
"httpx >= 0.20",
Expand Down

0 comments on commit d9f4224

Please sign in to comment.