forked from K4CZP3R/tapo-p100-python
-
-
Notifications
You must be signed in to change notification settings - Fork 28
74 lines (72 loc) · 1.87 KB
/
code-review.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
name: Code Review
on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- main
- dev
- next
permissions:
pull-requests: write
statuses: write
jobs:
validate-pr-title:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
docs
refactor
chore
fix
feat
breaking
scopes: |
ci
core
requireScope: true
ignoreLabels: |
bot
subjectPattern: ^.+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
wip: true
black:
name: Linting & Test
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: "Install python requirements"
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: "Check style"
run: |
black --check --verbose .
- name: "Test code"
run: |
pytest \
--durations=10 \
--cov-fail-under=60 \
--junitxml=pytest.xml \
--cov-report=term-missing:skip-covered \
--cov=app \
-p no:sugar \
tests/unit | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml