-
Notifications
You must be signed in to change notification settings - Fork 14
132 lines (106 loc) · 3.39 KB
/
ubuntu.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Ubuntu (build-&-test)
on:
push:
branches:
- devel
pull_request:
branches:
- devel
jobs:
# Tests classic build using Tox for selected Python versions
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Execute tests for Python ${{ matrix.python-version }} using Tox
run: tox -e py
- name: Generate docs for Python ${{ matrix.python-version }} using Tox
run: |
tox -e docs
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: coverage-${{ matrix.python-version }}
verbose: true
# Tests that perun is buildable from distribution packages (this is precursor for pypi install).
# We limit the test to version 3.11 in order to have less clutter in Actions
build-from-dist:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Create tarball or wheel
run: |
pip3 install -q build
make pypi-release
- name: Install from dist (wheel)
run: |
pip3 install dist/*.whl
- name: Install from dist (tar.gz)
run: |
pip3 install dist/*.tar.gz
- name: Try running perun and getting help
run: |
perun --help
# Tests that documentation is buildable. We limit the test to version 3.11 in order to have less clutter in Actions
build-docs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Generate docs for Python ${{ matrix.python-version }} using Tox
run: |
tox -e docs
# Tests correctes of typing for all versions
typing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Check type correctness for Python ${{ matrix.python-version }} using Tox
run: |
tox -e typing
# Test linting only for the latest version of python
linting:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Check lint correctness for Python ${{ matrix.python-version }} using Tox
run: |
tox -e lint || true