-
Notifications
You must be signed in to change notification settings - Fork 52
112 lines (112 loc) · 3.23 KB
/
ci.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Continuous Integration
on:
pull_request: null
push:
tags:
- '*'
branches:
- main
workflow_dispatch:
inputs: null
jobs:
docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
install-type: [dev]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install apt dependencies
run: |
sudo apt update -qq
sudo apt install -qq graphviz
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-${{ matrix.python-version }}-${{ matrix.install-type }}-${{ hashFiles('**/setup.json')
}}
restore-keys: pip-${{ matrix.python-version }}-${{ matrix.install-type }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install the python project
env:
INSTALL_TYPE: ${{ matrix.install-type }}
run: .ci/install_script.sh
- name: Build documentation
env:
READTHEDOCS: 'True'
run: SPHINXOPTS='-nW' make -C doc html
- uses: actions/upload-artifact@v2
with:
name: doc-build
path: doc/build/html
pre-commit:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
install-type: [dev]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install apt dependencies
run: |
sudo apt update -qq
sudo apt install -qq graphviz
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-${{ matrix.python-version }}-${{ matrix.install-type }}-${{ hashFiles('**/setup.json')
}}
restore-keys: pip-${{ matrix.python-version }}-${{ matrix.install-type }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install the python project
env:
INSTALL_TYPE: ${{ matrix.install-type }}
run: .ci/install_script.sh
- name: Run pre-commit
run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1
)
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
install-type: [dev]
include:
- python-version: '3.12'
install-type: dev_sdist
- python-version: '3.12'
install-type: dev_bdist_wheel
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install apt dependencies
run: |
sudo apt update -qq
sudo apt install -qq graphviz
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-${{ matrix.python-version }}-${{ matrix.install-type }}-${{ hashFiles('**/setup.json')
}}
restore-keys: pip-${{ matrix.python-version }}-${{ matrix.install-type }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install the python project
env:
INSTALL_TYPE: ${{ matrix.install-type }}
run: .ci/install_script.sh
- name: Run pytest
run: pytest --cov=z2pack --cov-config=.coveragerc
- name: Run codecov
run: codecov