-
Notifications
You must be signed in to change notification settings - Fork 23
79 lines (66 loc) · 2.01 KB
/
test.yaml
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
# Try to get a short workflow name and a job name that start with Python
# version to make it easier to check the status inside GitHub UI.
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
defaults:
run:
shell: bash
jobs:
testing:
runs-on: ubuntu-20.04
name: ${{ matrix.python-version }}-linux
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.10", "pypy-3.7"]
env:
# As of April 2021 GHA VM have 2 CPUs - Azure Standard_DS2_v2
# Trial distributed jobs enabled to speed up the CI jobs.
TRIAL_ARGS: "-j 4"
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ runner.os }}-pip-${{ hashFiles('pyproject.toml', 'setup.py',
'setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: twisted/python-info-action@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Test
run: |
coverage run -p -m twisted.trial txacme
- name: Prepare coverage
if: ${{ !cancelled() }}
run: |
# sub-process coverage are generated in separate files so we combine them
# to get an unified coverage for the local run.
# The XML is generate to be used with 3rd party tools like diff-cover.
python -m coverage combine
python -m coverage xml -o coverage.xml -i
python -m coverage report --skip-covered
ls -al
- uses: codecov/codecov-action@v2
if: ${{ !cancelled() }}
with:
files: coverage.xml
name: lnx-${{ matrix.python-version }}
fail_ci_if_error: true