Merge pull request #136 from weekenthralling/deps #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI" | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- "src/**" | |
- "tests/**" | |
- "Makefile" | |
- "pyproject.toml" | |
pull_request: | |
branches: [ main ] | |
paths: | |
- "src/**" | |
- "tests/**" | |
- "Makefile" | |
- "pyproject.toml" | |
jobs: | |
run: | |
name: "tests & coverage" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip cache | |
if: runner.os == 'Linux' | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | |
restore-keys: ${{ runner.os }}-pip- | |
- name: Install hatch | |
run: | | |
pipx install hatch | |
- name: Lint | |
run: make lint | |
- name: Tests | |
run: make test |