-
Notifications
You must be signed in to change notification settings - Fork 99
112 lines (105 loc) · 3.16 KB
/
tests.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Tox Tests
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
sed -i -e 's/^/#/' tests/gnupghome/gpg-agent.conf
if [ "$(uname)" = "Darwin" ]; then ./install_dependencies.osx.sh; else ./install_dependencies.linux.sh; fi
pip install tox coveralls
- name: Run Tox
run: ./tox.sh -e py
- name: Upload Coveralls coverage
if: ${{ success() }}
run: coveralls --service=github
env:
COVERALLS_PARALLEL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# do some tests with LC_ALL=C to check for locale variance
c-locale-test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install requirements
run: |
sed -i -e 's/^/#/' tests/gnupghome/gpg-agent.conf
./install_dependencies.linux.sh
pip install tox coveralls
- name: Run Tox
run: ./tox.sh -e py
env:
LC_ALL: C
- name: Upload Coveralls coverage
if: ${{ success() }}
run: coveralls --service=github
env:
COVERALLS_PARALLEL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# test setup.py using each tested version
test-setup:
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- python-version: 3.6
env: py36-setup
- python-version: 3.7
env: py37-setup
- python-version: 3.8
env: py38-setup
- python-version: 3.9
env: py39-setup
- python-version: '3.10'
env: py310-setup
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Run tox
run: tox -e ${{ matrix.env }}
# add a pep8 test
pep8:
runs-on: ubuntu-18.04
continue-on-error: true # pep8 failures shouldn't be considered fatal
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install tox
run: pip install tox
- name: Run tox
run: tox -e pep8
# report coverage to coveralls, but only for pytest runs
finish-coveralls:
needs: [ unit-tests, c-locale-test ]
runs-on: ubuntu-18.04
steps:
- uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Finish Coveralls
run: |
pip install coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}