-
Notifications
You must be signed in to change notification settings - Fork 47
61 lines (56 loc) · 1.83 KB
/
test-pr.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
name: PR QA
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Checkout and Build
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U flake8 pep257 pytest-cov codecov codacy-coverage pluggy
pip install -e .
- name: Lint code with flake8
run: flake8 . --count --show-source --max-line-length=127 --statistics
- name: Lint code with pep257
if: matrix.python-version == 2.7
run: pep257 --match="(?!fido).*\.py" ./fido
- name: Test using pytest
run: pytest --cov=fido
- name: Generate LCOV coverage report
if: matrix.python-version == 3.10
run: coverage xml -o cobertura.xml
- name: Upload coverage report
if: matrix.python-version == 3.10
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: cobertura.xml
coverage:
name: Quality Assurance
runs-on: ubuntu-20.04
needs: [ build ]
steps:
- name: Download coverage report
uses: actions/download-artifact@v4
with:
name: coverage-report
path: cobertura.xml
- name: Codecov coverage reporting
uses: codecov/codecov-action@v3
with:
files: cobertura.xml
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
- name: Codacy analysis reporting
uses: codacy/[email protected]