forked from schemathesis/schemathesis
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (75 loc) · 2.06 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
name: Build jobs
# Triggered by changes in code-specific or job-specific files
on:
pull_request:
paths:
- "**.py"
- ".github/workflows/*.yml"
- ".pre-commit-config.yaml"
- ".relint.yml"
- ".yamllint"
- "pyproject.toml"
- "tox.ini"
- "mypy.ini"
push:
branches:
- master
workflow_dispatch:
env:
FORCE_COLOR: "1"
TOX_TESTENV_PASSENV: FORCE_COLOR
jobs:
pre-commit:
name: Generic pre-commit checks
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
with:
fetch-depth: 1
- uses: actions/[email protected]
with:
python-version: 3.9
- run: pip install pre-commit
- run: pre-commit run --all-files
docs:
name: Documentation
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
with:
fetch-depth: 1
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
tests:
strategy:
matrix:
os: [ubuntu-20.04, windows-2019]
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# Set the patch version for "python", so GitHub adds 3 configurations instead of expanding existing ones
include:
- os: ubuntu-20.04
python: "3.9.16"
tox_env: hypothesis648
- os: ubuntu-20.04
python: "3.9.16"
tox_env: pytest6
- os: ubuntu-20.04
python: "3.9.16"
tox_env: pytest53
name: Tests (Python ${{ matrix.python }} on ${{ matrix.os }} ${{ matrix.tox_env }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
with:
fetch-depth: 1
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python }}
- run: pip install tox tox-gh-actions
- if: ${{ matrix.tox_env }}
run: python -m tox -e ${{ matrix.tox_env }}
- if: ${{ !matrix.tox_env }}
run: python -m tox
- name: Upload coverage to Codecov
uses: codecov/[email protected]