45 lines (42 loc) · 1.25 KB
/
main.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
name: Continuous Integration
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '30 0 * * 1'
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']
sphinx-version: ['>=3.0.0,<4.0.0', '>=4.0.0,<5.0.0', '>=5.0.0,<5.1.0', '>=5.1.0,<6.0.0']
exclude:
# Old major version does not support python 3.10
- python-version: '3.10'
sphinx-version: '>=3.0.0,<4.0.0'
steps:
- uses: actions/checkout@v3
- run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
architecture: x64
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry env use "${{ matrix.python-version }}"
poetry install
.venv/bin/pip install 'Sphinx${{ matrix.sphinx-version }}'
poetry run python tools/fetch_revealjs.py
- name: Lint sources and doc
run: |
poetry run black --check .
poetry run flake8 .
poetry run doc8 .
- name: Test with nosetests
run: |
poetry run pytest