forked from sphinx-contrib/confluencebuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (87 loc) · 4.15 KB
/
build.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
# Action which validates the ability to build this extension against multiple
# versions of Sphinx using various Python interpreters.
name: Build
on:
push:
branches:
- main
paths:
- '.github/workflows/build.yml'
- 'sphinxcontrib/**'
- 'tests/**'
- '.pylintrc'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'requirements_dev.txt'
- 'ruff.toml'
- 'tox.ini'
pull_request:
branches:
- main
paths:
- '.github/workflows/build.yml'
- 'sphinxcontrib/**'
- 'tests/**'
- '.pylintrc'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'requirements_dev.txt'
- 'ruff.toml'
- 'tox.ini'
jobs:
build:
name: ${{ matrix.toxenv }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# test each python/sphinx pair supported
- { os: ubuntu-latest, python: "3.8", toxenv: py38-sphinx62, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.8", toxenv: py38-sphinx70, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.8", toxenv: py38-sphinx71, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.9", toxenv: py39-sphinx62, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.9", toxenv: py39-sphinx70, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.9", toxenv: py39-sphinx71, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.9", toxenv: py39-sphinx72, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.9", toxenv: py39-sphinx73, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.10", toxenv: py310-sphinx62, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.10", toxenv: py310-sphinx70, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.10", toxenv: py310-sphinx71, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.10", toxenv: py310-sphinx72, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.10", toxenv: py310-sphinx73, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.11", toxenv: py311-sphinx62, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.11", toxenv: py311-sphinx70, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.11", toxenv: py311-sphinx71, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.11", toxenv: py311-sphinx72, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.11", toxenv: py311-sphinx73, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.12", toxenv: py312-sphinx62, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.12", toxenv: py312-sphinx70, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.12", toxenv: py312-sphinx71, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.12", toxenv: py312-sphinx72, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.12", toxenv: py312-sphinx73, cache: ~/.cache/pip }
# other OSes
# - test against all other supported OSes, using most recent interpreter/sphinx
- { os: macos-latest, python: "3.12", toxenv: py312-sphinx73, cache: ~/Library/Caches/pip }
- { os: windows-latest, python: "3.12", toxenv: py312-sphinx73, cache: ~\AppData\Local\pip\Cache }
# linting
# - any OS, using most recent interpreter
- { os: ubuntu-latest, python: "3.12", toxenv: ruff, cache: ~/.cache/pip }
- { os: ubuntu-latest, python: "3.12", toxenv: pylint, cache: ~/.cache/pip }
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Cache pip
uses: actions/cache@v4
id: cache-pip
with:
path: ${{ matrix.cache }}
key: ${{ matrix.os }}-${{ matrix.python }}-pip-
- name: Install dependencies
run: python -m pip install --upgrade tox
- name: tox
env:
TOXENV: ${{ matrix.toxenv }}
run: tox