-
Notifications
You must be signed in to change notification settings - Fork 44
60 lines (47 loc) · 1.47 KB
/
pr-check.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
name: Test greentea tools
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.9]
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Code Formatting and Static Analysis
run: tox -e linting
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.9]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch history so setuptools-scm can calculate the version correctly
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Run tests on ${{ matrix.os }} py ${{ matrix.python-version }}
run: tox -e py
- name: Create Coverage Report
run: |
set -xe
python -m pip install coverage[toml]
python -m coverage xml
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
- name: Upload Coverage Report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
uses: "codecov/codecov-action@v1"
with:
fail_ci_if_error: true