Setup linting and formatting using ruff #332
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: tests | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
tests: | |
name: tests | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11.3' | |
architecture: x64 | |
- name: Restore cached deps | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Hatch | |
uses: pypa/hatch@a3c83ab3d481fbc2dc91dd0088628817488dd1d5 | |
- name: Linting | |
run: | | |
ruff check | |
- name: Run tests | |
run: | | |
hatch run test:pytest |