-
Notifications
You must be signed in to change notification settings - Fork 15
61 lines (50 loc) · 1.56 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
# ==============================================================
# CI with GitHub Actions
# ==============================================================
name: Testing
on:
workflow_call:
env:
default-python: '3.10'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
tox_env: [py39, py310, py311, py312]
include:
- tox_env: style
- tox_env: docstyle
- tox_env: check-manifest
- tox_env: check-testdir
- tox_env: check-headers
- tox_end: check-apidocsdir
- tox_env: coverage
- tox_env: mkdocs
pandoc: true
# The operative sistem
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
# the steps of the CI
steps:
- uses: actions/checkout@master
# optionals
- name: Install pandoc
if: ${{ matrix.pandoc }}
run: sudo apt-get install pandoc
- name: Determine Python version
id: pyversion
if: ${{ startsWith( matrix.tox_env, 'py3' ) }}
uses: bluwy/substitute-string-action@v1
with:
_input-text: ${{ matrix.tox_env }}
py3: "3."
# tox steps
- name: Set up Python ${{ steps.pyversion.outputs.result || env.default-python }}
uses: actions/setup-python@v2
with:
python-version: ${{ steps.pyversion.outputs.result || env.default-python }}
- name: Install tox
run: pip install tox
- name: tox -re ${{ matrix.tox_env }}
run: tox -re ${{ matrix.tox_env }}