-
Notifications
You must be signed in to change notification settings - Fork 16
83 lines (70 loc) · 1.98 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
name: Build and Test ebuildtester
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: true
matrix:
include:
- os: ubuntu-22.04
python-version: 3.8
- os: ubuntu-22.04
python-version: 3.9
- os: ubuntu-22.04
python-version: '3.10'
- os: ubuntu-22.04
python-version: '3.11'
- os: ubuntu-22.04
python-version: '3.12'
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.os }} / ${{ matrix.python-version }} build
steps:
- name: Get tox environment
run: |
tox_environment="py${python_version/./}"
echo "tox_environment=${tox_environment}" >> $GITHUB_ENV
env:
python_version: ${{ matrix.python-version }}
- name: Check out sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: sudo apt install --yes tox
- name: Build and test
run: tox -e ${{ env.tox_environment }}
- name: Archive test results
uses: actions/upload-artifact@v2
with:
name: test log (${{ env.tox_environment }})
path: .tox/${{ env.tox_environment }}/log
if: failure()
- name: Bandit
run: tox -e bandit
if: ${{ matrix.python-version == '3.10' }}
- name: Archive bandit results
uses: actions/upload-artifact@v2
with:
name: bandit log
path: .tox/bandit/log
if: ${{ matrix.python-version == '3.10' && failure() }}
- name: Pep8
run: tox -e pep8
if: ${{ matrix.python-version == '3.10' }}
- name: Build docs
run: tox -e docs
if: ${{ matrix.python-version == '3.10' }}
- name: Test PyPi Package
run: tox -e pypi
if: ${{ matrix.python-version == '3.10' }}