-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 861 Bytes
/
python-check.yml
File metadata and controls
36 lines (30 loc) · 861 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
on:
workflow_dispatch:
push:
jobs:
python-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
working-directory: src
run: |
python -m pip install --upgrade pip
pip install flake8 pytest coverage
pip install -r ../requirements.txt
- name: Lint with flake8
working-directory: src
run: |
flake8 . --count --max-complexity=12 --max-line-length=127 --statistics --exclude venv
- name: Test with pytest
working-directory: src
run: |
coverage run -m pytest
- name: Check coverage
working-directory: src
run: |
coverage report --fail-under=95