-
Notifications
You must be signed in to change notification settings - Fork 36
51 lines (44 loc) · 1.33 KB
/
pythonpackage.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
name: CI
on:
push:
pull_request:
schedule:
- cron: 42 0 * * 5
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, 'pypy3']
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint Python code with flake8
run: |
pip install flake8
# ignore max complexity and line break after binary operator
flake8 tnefparse/ tests/ setup.py --ignore=C901,W504
# check max complexity, but do not enforce it
flake8 tnefparse/ tests/ setup.py --count --exit-zero --max-complexity=10 --statistics
- name: Test with pytest
run: |
pip install -e .[optional]
pip install pytest pytest-console-scripts pytest-cov codecov
pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
files: coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true