-
Notifications
You must be signed in to change notification settings - Fork 197
140 lines (113 loc) · 3.41 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
on:
workflow_dispatch:
push:
branches:
- develop
- 7.1
- 7.2
pull_request:
branches:
- develop
- 7.1
- 7.2
name: Run tests
jobs:
precommit:
name: Pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
- name: Download artifacts
uses: actions/download-artifact@v3
- 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-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- 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: [f38,f39,rawhide]
unit_tests:
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- 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@v3
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: [f38,f39,pip,rawhide]
module: [bodhi-client, bodhi-messages, bodhi-server]
docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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: [f38,f39,pip,rawhide]
rpms:
name: Build the RPMS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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@v3
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: [f38,f39,rawhide]