-
-
Notifications
You must be signed in to change notification settings - Fork 79
49 lines (40 loc) · 1.14 KB
/
lint.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
name: Lint
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
pull_request_target:
branches: [ master ]
permissions:
checks: write
contents: read
jobs:
run-linters:
name: Run linters and tests
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: pip install black flake8 mypy pytest pytest-cov pytest-asyncio -e .
- name: Run linters
uses: samuelmeuli/lint-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Enable linters
black: true
flake8: true
mypy: true
flake8_args: "--exclude='test.py __init__.py' --max-line-length=120"
auto_fix: false
git_email: "sbidy@hotmail.com"
- name: Test with pytest
run: |
pytest --durations=0 --cov=pywizlight --cov-report term-missing --cov-report xml
- name: Upload codecov
uses: codecov/codecov-action@v2