-
Notifications
You must be signed in to change notification settings - Fork 8
84 lines (75 loc) · 2.05 KB
/
push.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
name: Commit
on: push
jobs:
tests:
name: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setting up tox environment
uses: docker://kiwicom/tox:3.21.2
env:
TOXENV: ${{ matrix.toxenv }}
XDG_CACHE_HOME: /tmp/cache
with:
args: >
sh -c
"
mkdir -p reports ;
tox -e tests-$TOXENV -- --junitxml=reports/$TOXENV/test_report.xml --cov structlog_sentry --cov-report xml --cov-config .coveragerc --cov-append --cov-report xml:reports/coverage.xml
"
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: .tox
key: ${{ runner.os }}-${{ hashFiles('requirements.txt') }}
strategy:
matrix:
toxenv: [py37, py38, py39]
lint:
name: pylint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setting up tox environment
uses: docker://kiwicom/tox
env:
XDG_CACHE_HOME: /tmp/cache
with:
args: >
sh -c
"
mkdir -p reports ;
tox -e pylint
"
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: .tox
key: ${{ runner.os }}-${{ hashFiles('requirements.txt') }}
commitsar:
name: Commit message style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run commitsar
uses: docker://aevea/commitsar
pre-commit:
name: Static checks
runs-on: ubuntu-latest
container: kiwicom/pre-commit:2.9.3
steps:
- uses: actions/checkout@v2
- name: Cache
uses: actions/cache@v2
with:
path: .pre-commit-cache
key: static-checks-${{ hashFiles('.pre-commit-config.yaml') }}
- run: mkdir -p .pre-commit-cache
- run: pre-commit install --install-hooks
- run: pre-commit run -a
env:
SKIP: no-commit-to-branch