-
Notifications
You must be signed in to change notification settings - Fork 112
38 lines (31 loc) · 857 Bytes
/
pre-commit.yml
File metadata and controls
38 lines (31 loc) · 857 Bytes
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
name: pre-commit
on:
push:
# run on push only in master, develop, version specific and hotfix branches
branches:
- master
- develop
- '[0-9].[0-9]+.[0-9]+.?[0-9]?'
pull_request:
# run on branches having an open PR
branches:
- '**'
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry==1.*
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'poetry'
- name: Install dependencies and library
run: poetry install --no-interaction
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure