generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (42 loc) · 1.19 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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci-pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install project
run: pip install -e .[dev,test]
- name: run pre-commit
run: "pre-commit run --all"
ci-test:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12.0-rc.1"]
sphinx-version: ["6.*", "7.*"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install project
run: pip install -e .[test]
- name: Install sphinx
run: pip install sphinx==${{ matrix.sphinx-version }}
- name: run tests (with coverage)
run: "pytest --cov swagger_plugin_for_sphinx --cov-report html --cov-report xml tests/"
- name: run diff-cover
run: "diff-cover --config-file pyproject.toml coverage.xml"