Run pre-commit as part of github workflow
This commit is contained in:
parent
9358c894f7
commit
dc75b494bc
2 changed files with 7 additions and 4 deletions
5
.github/workflows/publish.yaml
vendored
5
.github/workflows/publish.yaml
vendored
|
@ -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
|
||||
|
|
6
.github/workflows/test.yaml
vendored
6
.github/workflows/test.yaml
vendored
|
@ -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
|
||||
|
|
Reference in a new issue