-
-
Notifications
You must be signed in to change notification settings - Fork 45
103 lines (96 loc) · 2.91 KB
/
ci_workflows.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
name: CI
on:
pull_request:
push:
branches: [ main ]
tags: '*'
workflow_dispatch:
schedule:
# Weekly cron
- cron: '0 8 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Code style checks
os: ubuntu-latest
python-version: 3.x
toxenv: codestyle
# Linux - test different Sphinx versions
- os: ubuntu-latest
python-version: 3.8
toxenv: py38-test-sphinx_oldest
- os: ubuntu-latest
python-version: 3.8
toxenv: py38-test-sphinx53
- os: ubuntu-latest
python-version: 3.9
toxenv: py39-test-sphinx62
- os: ubuntu-latest
python-version: 3.9
toxenv: py39-test-sphinx70
- os: ubuntu-latest
python-version: '3.10'
toxenv: py310-test-sphinx71
- os: ubuntu-latest
python-version: '3.11'
toxenv: py311-test-sphinx72-cov-clocale
- os: ubuntu-latest
python-version: '3.12'
toxenv: py312-test-sphinx80
- os: ubuntu-latest
python-version: '3.12'
toxenv: py312-test-sphinxdev
# MacOS X - just the stable and dev
- os: macos-latest
python-version: '3.10'
toxenv: py310-test-sphinx80-clocale
- os: macos-latest
python-version: '3.11'
toxenv: py311-test-sphinxdev
# Windows - just the oldest, stable, and dev
- os: windows-latest
python-version: 3.8
toxenv: py38-test-sphinx_oldest
- os: windows-latest
python-version: '3.10'
toxenv: py310-test-sphinx80
- os: windows-latest
python-version: '3.11'
toxenv: py311-test-sphinxdev
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install graphviz on Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install graphviz
- name: Install graphviz on OSX
if: startsWith(matrix.os, 'macos')
run: |
brew update
brew install graphviz
- name: Install graphviz on Windows
if: startsWith(matrix.os, 'windows')
run: choco install graphviz
- name: Install tox
run: python -m pip install tox
- name: Run tox
run: tox ${{ matrix.toxargs }} -v -e ${{ matrix.toxenv }}
- name: Upload coverage to codecov
if: ${{ contains(matrix.toxenv,'-cov') }}
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml