-
Notifications
You must be signed in to change notification settings - Fork 197
162 lines (135 loc) · 3.96 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
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
on:
workflow_dispatch:
push:
branches:
- develop
- 8.0
- 8.1
- 8.2
- 8.3
pull_request:
branches:
- develop
- 8.0
- 8.1
- 8.2
- 8.3
name: Run tests
jobs:
precommit:
name: Pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install deps
run: pip install click
# we only really need to run the precommit checks for one release,
# so we just do it for pip
- name: Run the pre-commit checks
run: devel/ci/bodhi-ci pre-commit -r pip
diff_cover:
name: Diff-cover check
runs-on: ubuntu-latest
needs: unit_tests
# Run diff-cover even if the unit tests failed on rawhide:
if: always()
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Edit the path in the coverage files
run: sed -i -e "s,<source>/bodhi,<source>$PWD," Coverage*/coverage.xml
shell: bash
- name: Install deps
run: pip install diff-cover
- name: Run the diff-cover check
shell: bash
run: diff-cover --compare-branch=origin/develop --fail-under=100 Coverage*/coverage.xml
integration_tests:
name: Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install deps
run: pip3 install click -r devel/ci/integration/requirements.txt
- name: Run the integration tests
run: python3 devel/ci/bodhi-ci integration -r ${{ matrix.release }}
strategy:
fail-fast: false
matrix:
# integration tests are broken on pip atm, so not included in this list.
release: [f40,f41,rawhide]
unit_tests:
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install deps
run: pip install click
- name: Run the unit tests
run: devel/ci/bodhi-ci unit -r ${{ matrix.release }} -m ${{matrix.module}}
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: Coverage for ${{ matrix.module }} on ${{ matrix.release }}
path: test_results/${{ matrix.release }}-unit/${{ matrix.module }}/coverage.xml
strategy:
fail-fast: false
matrix:
release: [f40,f41,pip,rawhide]
module: [bodhi-client, bodhi-messages, bodhi-server]
docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install deps
run: pip install click -r docs/requirements.txt
- name: Build the docs
run: devel/ci/bodhi-ci docs -r ${{ matrix.release }}
strategy:
fail-fast: false
matrix:
release: [f40,f41,pip,rawhide]
rpms:
name: Build the RPMS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install deps
run: pip install click
- name: Build the rpms
run: devel/ci/bodhi-ci rpm -r ${{ matrix.release }}
- name: Upload built rpms
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.release }} RPMs
path: |
test_results/${{ matrix.release }}-rpm/*.noarch.rpm
test_results/${{ matrix.release }}-rpm/*.src.rpm
strategy:
fail-fast: false
matrix:
release: [f40,f41,rawhide]