-
Notifications
You must be signed in to change notification settings - Fork 33
105 lines (83 loc) · 2.21 KB
/
build.yaml
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
name: Build Aiven Client
permissions: read-all
on:
push:
branches:
- main
tags:
- '**'
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
# only use one version for the lint step
python-version: [3.8]
steps:
- id: checkout-code
uses: actions/checkout@v3
with:
persist-credentials: false
- id: prepare-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- id: dependencies
run: make install-py
- id: validate-style
run: make validate-style
- id: ruff
run: make ruff
- id: flake8
run: make flake8
- id: mypy
run: make mypy
test:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10']
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- id: checkout-code
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- id: prepare-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- id: build-and-test
name: Build and test
run: |
pip install pytest
pip install -e .
pytest -vv tests/
test-fedora:
runs-on: ubuntu-latest
container: 'fedora:37'
needs: lint
steps:
- id: dependencies
run: sudo dnf install -y git-core make
- id: checkout-code
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
# See: https://github.com/actions/runner-images/issues/6775#issuecomment-1377299658
- id: chown-container-working-directory
name: Change Owner of Container Working Directory
run: chown root:root .
- id: build-and-test
name: Build and test
run: |
make build-dep-fedora
make rpm
- id: install
name: Install
run: sudo dnf install -y rpms/noarch/*.rpm
# test step is not needed (tests run on a build)