Run pre-commit before tests

This commit is contained in:
Gabriel Augendre 2023-03-14 10:50:53 +01:00
parent ae725426c8
commit 5b20019c18

View file

@ -25,11 +25,6 @@ jobs:
run: | run: |
pip install pip-tools pip install pip-tools
pip-sync requirements.txt requirements-dev.txt pip-sync requirements.txt requirements-dev.txt
- name: Ruff
run: ruff --format=github .
- name: Test
run: pytest --cov=. --cov-branch --cov-report term-missing:skip-covered
working-directory: ./src/
- name: Setup pre-commit cache - name: Setup pre-commit cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -37,6 +32,9 @@ jobs:
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Check pre-commit - name: Check pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files run: pre-commit run --show-diff-on-failure --color=always --all-files
- name: Test
run: pytest --cov=. --cov-branch --cov-report term-missing:skip-covered
working-directory: ./src/
auto_merge: auto_merge:
name: Auto merge name: Auto merge
runs-on: ubuntu-latest runs-on: ubuntu-latest