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:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
uses: ./.github/workflows/test.yaml
|
uses: ./.github/workflows/test.yaml
|
||||||
|
@ -30,8 +33,6 @@ jobs:
|
||||||
cache-from: type=registry,ref=crocmagnon/blog:latest
|
cache-from: type=registry,ref=crocmagnon/blog:latest
|
||||||
cache-to: type=inline
|
cache-to: type=inline
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
build-args: |
|
|
||||||
POETRY_OPTIONS=--no-dev
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy new image
|
name: Deploy new image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
6
.github/workflows/test.yaml
vendored
6
.github/workflows/test.yaml
vendored
|
@ -6,6 +6,9 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
name: Python tests
|
name: Python tests
|
||||||
|
@ -22,8 +25,7 @@ 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
|
- name: Test
|
||||||
run: pytest --cov=. --cov-branch --cov-report term-missing:skip-covered
|
run: pytest --cov=. --cov-branch --cov-report term-missing:skip-covered
|
||||||
working-directory: ./src/
|
working-directory: ./src/
|
||||||
|
- uses: pre-commit/action@v3.0.0
|
||||||
|
|
Reference in a new issue