Skip to content
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
16 changes: 15 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,24 @@ jobs:
3.12
3.13
3.14
- name: Compute cache window
id: cache_window
run: |
week=$(date +%Y-W%U)
echo "week=$week" >> $GITHUB_OUTPUT
echo "Cache window: $week"
- name: Cache hatch envs
uses: actions/cache@v4
with:
path: ~/.local/share/hatch
key: hatch-${{ runner.os }}-${{ steps.cache_window.outputs.week }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
hatch-${{ runner.os }}-${{ steps.cache_window.outputs.week }}-
hatch-${{ runner.os }}-
- name: Install
run: pip install hatch pyright .[test]
- name: Run tests
run: hatch test --all --cover
run: hatch test --all --cover --parallel
- name: Run static checks
run: hatch run test:pyright
- name: Upload coverage reports to Coveralls
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ version-file = "startle/_version.py"
dependencies = [ "pytest", "pytest-cov", "pyright", "typing-extensions" ]

[tool.hatch.envs.hatch-test]
dependencies = [ "pytest", "pytest-cov", "pyright", "typing-extensions" ]
dependencies = [ "pytest", "pytest-cov", "pytest-xdist", "pyright", "typing-extensions" ]
args = ["-ra", "-q"]

[[tool.hatch.envs.hatch-test.matrix]]
Expand Down
Loading