-
Notifications
You must be signed in to change notification settings - Fork 344
193 lines (166 loc) · 6.46 KB
/
ci.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: GH Actions
on:
pull_request:
workflow_dispatch:
jobs:
full-smokecheck-linux:
name: Linux with Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0]
fail-fast: false
steps:
- run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}, runner on ${{ runner.os }}"
- name: Check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Install Python 3.6 compatible urllib3
if: ${{ matrix.python-version == 3.6 }}
run: python3 -m pip install urllib3==1.26.16
- name: Installing Avocado in develop mode
run: python3 setup.py develop --user
- name: Avocado version
run: avocado --version
- name: Avocado smoketest
run: python -m avocado run examples/tests/passtest.py
- name: Tree static check, unittests and fast functional tests
env:
AVOCADO_LOG_DEBUG: "yes"
AVOCADO_CHECK_LEVEL: "1"
run: make check
- name: Archive failed tests logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: linux-logs-${{ matrix.python-version }}
path: /home/runner/avocado/job-results/
retention-days: 1
- run: echo "🥑 This job's status is ${{ job.status }}."
code-coverage:
name: Code Coverage
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.9, 3.10.0]
steps:
- run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}, runner on ${{ runner.os }}"
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install and pre script
env:
SELF_CHECK_CONTINUOUS: "yes"
CC_TEST_REPORTER_ID: "387887b88a76f31c2c376219fc749689ea5975c8fe7fcd9609f1dcc139e053a6"
run: |
pip install -r requirements-dev.txt
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run script
env:
SELF_CHECK_CONTINUOUS: "yes"
CC_TEST_REPORTER_ID: "387887b88a76f31c2c376219fc749689ea5975c8fe7fcd9609f1dcc139e053a6"
run: make develop && ./selftests/run_coverage
- name: post script
env:
SELF_CHECK_CONTINUOUS: "yes"
CC_TEST_REPORTER_ID: "387887b88a76f31c2c376219fc749689ea5975c8fe7fcd9609f1dcc139e053a6"
run: ./cc-test-reporter after-build
- run: echo "🥑 This job's status is ${{ job.status }}."
# OS X smokecheck on latest Python
smokecheck-osx:
name: OS X with Python ${{ matrix.python-version }}
runs-on: macos-12
strategy:
matrix:
python-version: [3.11.1]
steps:
- run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}, runner on ${{ runner.os }}"
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install avocado
run: |
python3 -m pip install -r requirements-dev.txt
python setup.py develop --user
- name: Show avocado help
run: python -m avocado --help
- name: Example test
run: python -m avocado run examples/tests/passtest.py
- name: List test
run: python -m avocado --verbose list selftests/unit/* selftests/functional/* selftests/*sh
# This test is known NOT to work
#- name: unittest test
# run: python -m unittest discover -v selftests.unit
- run: echo "🥑 This job's status is ${{ job.status }}."
# Windows checks on latest Python
smokecheck-windows:
name: Windows with Python ${{ matrix.python-version }}
runs-on: windows-2019
strategy:
matrix:
python-version: [3.9, 3.10.0]
steps:
- run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}, runner on ${{ runner.os }}"
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install avocado
run: python setup.py develop --user
- name: Show avocado help
run: python -m avocado --help
- name: Example test
run: python -m avocado run examples\tests\passtest.py
- run: echo "🥑 This job's status is ${{ job.status }}."
# Checks that Python packages builds succeeds
package-build:
name: Build Package for Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Build eggs
run: python setup.py bdist_egg
- name: Save eggs as artifacts
uses: actions/upload-artifact@v2
with:
name: egg-${{ matrix.python-version }}
path: /home/runner/work/avocado/avocado/dist/
retention-days: 1
- run: echo "🥑 This job's status is ${{ job.status }}."