Merge pull request #622 from fnmeyer/v2 #1715
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: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rye | |
uses: sbarrios93/[email protected] | |
- name: Set up Python ${{ matrix.python-version }} | |
run: rye pin ${{ matrix.python-version }} | |
- name: Set up cache | |
uses: actions/[email protected] | |
id: venv-cache | |
with: | |
path: .venv | |
key: | |
venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ | |
hashFiles('requirements.lock') }}-${{ hashFiles('requirements-dev.lock') }}- | |
- name: Install dependencies | |
run: | | |
rye sync | |
- name: pre-commit | |
run: | | |
rye run pre-commit run --all-files --show-diff-on-failure --color always | |
- name: Run tests | |
run: | | |
make test | |
- name: Run safety checks | |
run: | | |
make check-safety |