feat: update CI ad pre-commit configurations #12
Workflow file for this run
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 ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ 3.12 ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} and Poetry | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
poetry-version: '1.8.4' # Specify the Poetry version you need | |
cache: 'poetry' # Caches Poetry dependencies | |
- name: Install dependencies | |
run: poetry install | |
- name: Run pre-commit hooks | |
run: poetry run pre-commit run --all-files --show-diff-on-failure | |
- name: Run tests | |
run: poetry run pytest |