-
-
Notifications
You must be signed in to change notification settings - Fork 21
47 lines (36 loc) · 1.08 KB
/
linters.yaml
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
43
44
45
46
47
name: Linters
on:
pull_request:
jobs:
gitlint:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up python environment
uses: actions/setup-python@v4
with:
cache: 'pip'
- run: pip install gitlint
# NOTE: first commit using conventional-commits: 8115756
- run: gitlint --fail-without-commits --commits main..HEAD
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up python environment
uses: actions/setup-python@v4
with:
cache: 'poetry'
- run: poetry install --no-root --with=dev --sync
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: poetry run pre-commit run --show-diff-on-failure --color=always --all-files
shell: bash