-
Notifications
You must be signed in to change notification settings - Fork 13
51 lines (50 loc) · 1.95 KB
/
ci-docs.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
name: Run Tests
on:
push:
paths-ignore:
- 'junifer/**'
- '.github/workflows/**'
pull_request:
paths-ignore:
- 'junifer/**'
- '.github/workflows/**'
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- run: 'echo "No build required"'
- name: Create mock coverage.xml file
run: |
mkdir docs
touch docs/conf.py
echo '<?xml version="1.0" ?>' > coverage.xml
echo '<coverage version="6.5.0" timestamp="$(date +%s%3N)" lines-valid="1" lines-covered="1" line-rate="1" branches-valid="1" branches-covered="1" branch-rate="1" complexity="0">' >> coverage.xml
echo '<sources>' >> coverage.xml
echo '<source>/home/runner/work/docs/docs</source>' >> coverage.xml
echo '</sources>' >> coverage.xml
echo '<packages>' >> coverage.xml
echo '<package name="docs" line-rate="1" branch-rate="1" complexity="0">' >> coverage.xml
echo '<classes>' >> coverage.xml
echo '<class name="conf.py" filename="docs/conf.py" complexity="0" line-rate="1" branch-rate="1">' >> coverage.xml
echo '<methods/>' >> coverage.xml
echo '<lines>' >> coverage.xml
echo '<line number="7" hits="1"/>' >> coverage.xml
echo '</lines>' >> coverage.xml
echo '</class>' >> coverage.xml
echo '</classes>' >> coverage.xml
echo '</package>' >> coverage.xml
echo '</packages>' >> coverage.xml
echo '</coverage>' >> coverage.xml
if: matrix.python-version == 3.12
- name: Upload mock coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# Allow coverage upload failure
fail_ci_if_error: false
flags: docs
if: success() && matrix.python-version == 3.12