Run pre-commit as part of github workflow

This commit is contained in:
Gabriel Augendre 2023-03-02 14:21:05 +01:00
parent 9358c894f7
commit dc75b494bc
2 changed files with 7 additions and 4 deletions

View file

@ -6,6 +6,9 @@ on:
branches:
- master
permissions:
contents: read
jobs:
tests:
uses: ./.github/workflows/test.yaml
@ -30,8 +33,6 @@ jobs:
cache-from: type=registry,ref=crocmagnon/blog:latest
cache-to: type=inline
platforms: linux/amd64
build-args: |
POETRY_OPTIONS=--no-dev
deploy:
name: Deploy new image
runs-on: ubuntu-latest

View file

@ -6,6 +6,9 @@ on:
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
tests:
name: Python tests
@ -22,8 +25,7 @@ jobs:
run: |
pip install pip-tools
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/
- uses: pre-commit/action@v3.0.0