1
1
name : CI
2
2
3
3
on :
4
- # NOTE: CD relies on this configuration (see #1961)
5
4
push :
6
5
branches :
7
- - develop
8
- tags :
9
- - v*
6
+ - robust-ci-cd
10
7
11
8
pull_request :
12
9
workflow_dispatch :
@@ -15,87 +12,5 @@ permissions:
15
12
contents : read
16
13
17
14
jobs :
18
- tests :
19
- name : Tests
20
- strategy :
21
- fail-fast : false
22
- # Run regular TUF tests on each OS/Python combination, plus special tests
23
- # (sslib master) and linters on Linux/Python3.x only.
24
- matrix :
25
- python-version : ["3.7", "3.8", "3.9", "3.10"]
26
- os : [ubuntu-latest, macos-latest, windows-latest]
27
- toxenv : [py]
28
- include :
29
- - python-version : 3.x
30
- os : ubuntu-latest
31
- toxenv : with-sslib-master
32
- experimental : true
33
- - python-version : 3.x
34
- os : ubuntu-latest
35
- toxenv : lint
36
-
37
- env :
38
- # Set TOXENV env var to tell tox which testenv (see tox.ini) to use
39
- # NOTE: The Python 2.7 runner has two Python versions on the path (see
40
- # setup-python below), so we tell tox explicitly to use the 'py27'
41
- # testenv. For all other runners the toxenv configured above suffices.
42
- TOXENV : ${{ matrix.toxenv }}
43
-
44
- runs-on : ${{ matrix.os }}
45
-
46
- steps :
47
- - name : Checkout TUF
48
- uses : actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
49
-
50
- - name : Set up Python ${{ matrix.python-version }}
51
- uses : actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
52
- with :
53
- python-version : ${{ matrix.python-version }}
54
- cache : ' pip'
55
- cache-dependency-path : ' requirements*.txt'
56
-
57
- - name : Install dependencies
58
- run : |
59
- python3 -m pip install --upgrade pip
60
- python3 -m pip install --upgrade tox coveralls
61
-
62
- - name : Run tox (${{ env.TOXENV }})
63
- # See TOXENV environment variable for the testenv to be executed here
64
- run : tox
65
-
66
- - name : Publish on coveralls.io
67
- # A failure to publish coverage results on coveralls should not
68
- # be a reason for a job failure.
69
- continue-on-error : true
70
- # TODO: Maybe make 'lint' a separate job instead of case handling here
71
- if : ${{ env.TOXENV != 'lint' }}
72
- env :
73
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74
- COVERALLS_FLAG_NAME : ${{ runner.os }} / Python ${{ matrix.python-version }} / ${{ env.TOXENV }}
75
- COVERALLS_PARALLEL : true
76
- # Use cp workaround to publish coverage reports with relative paths
77
- # FIXME: Consider refactoring the tests to not require the test
78
- # aggregation script being invoked from the `tests` directory, so
79
- # that `.coverage` is written to and .coveragrc can also reside in
80
- # the project root directory as is the convention.
81
- run : |
82
- cp tests/.coverage .
83
- coveralls --service=github --rcfile=tests/.coveragerc
84
-
85
- coveralls-fin :
86
- # Always run when all 'tests' jobs have finished even if they failed
87
- # TODO: Replace always() with a 'at least one job succeeded' expression
88
- if : always()
89
- needs : tests
90
- runs-on : ubuntu-latest
91
- container : python:3-slim
92
- steps :
93
- - name : Install dependencies
94
- run : |
95
- python3 -m pip install --upgrade pip
96
- python3 -m pip install --upgrade coveralls
97
- - name : Finalize publishing on coveralls.io
98
- continue-on-error : true
99
- env :
100
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101
- run : coveralls --finish
15
+ test :
16
+ uses : ./.github/workflows/_test.yml
0 commit comments