Repository navigation
140 lines (117 loc) · 3.68 KB
/
Copy pathbuild.yml
File metadata and controls
140 lines (117 loc) · 3.68 KB
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
132
133
134
135
136
137
138
139
140
name: Build and run tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
workflow_call:
jobs:
setup:
name: Setup ${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/ci-setup
with:
python-version: ${{ matrix.python }}
- name: Print packages
run: python3 -m pip list
- name: Test installation
run: python3 -c "from ankaios_sdk import Ankaios"
unit_test:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/ci-setup
- name: Run unit tests
id: check
run: python3 run_checks.py --utest
continue-on-error: true
- name: Upload unit test report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: unit-test-report
path: reports/utest
- name: Fail job if check failed
if: steps.check.outcome != 'success'
run: exit 1
coverage:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/ci-setup
- name: Run coverage
id: check
run: python3 run_checks.py --cov
continue-on-error: true
- name: Upload coverage report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-report
path: reports/coverage
- name: Fail job if check failed
if: steps.check.outcome != 'success'
run: exit 1
lint:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/ci-setup
- name: Run lint
id: check
run: python3 run_checks.py --lint
continue-on-error: true
- name: Upload lint report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pylint-report
path: reports/pylint
- name: Fail job if check failed
if: steps.check.outcome != 'success'
run: exit 1
codestyle:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/ci-setup
- name: Run pep8 codestyle check
id: check
run: python3 run_checks.py --pep8
continue-on-error: true
- name: Upload codestyle report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: codestyle-report
path: reports/codestyle
- name: Fail job if check failed
if: steps.check.outcome != 'success'
run: exit 1
check_docs:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/ci-setup
with:
extras: docs
- name: Generate documentation
run: |
cd docs
make html
cd ..
- name: Upload documentation
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: docs_html
path: docs/build/html