-
Notifications
You must be signed in to change notification settings - Fork 140
42 lines (34 loc) · 963 Bytes
/
code_style.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Check code style
on:
push:
branches:
# PRs can only use caches from their target branch. We therefore need to
# make sure we run on 'main' too.
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-codestyle
cancel-in-progress: true
jobs:
style:
name: Check code style
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: poetry
python-version: "3.10"
- name: Install requirements
run: |
poetry install
- name: Install pre-commit
run: |
poetry run -- pre-commit install
- name: Run pre-commit
run: |
poetry run -- pre-commit run --all-files --color always --verbose --show-diff-on-failure