-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (108 loc) · 3.77 KB
/
checks.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
132
name: Checks
on: workflow_call
jobs:
version-check-job:
name: Version Check
runs-on: ubuntu-latest
steps:
- name: SCM Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
- name: Check Version(s)
run: poetry run version-check version.py
build-documentation-job:
name: Build Documentation
needs: [version-check-job]
runs-on: ubuntu-latest
steps:
- name: SCM Checkout
uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
- name: Build Documentation
run: |
poetry run python -m nox -s build-docs
lint-job:
name: Linting (Python-${{ matrix.python-version }})
needs: [version-check-job]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: SCM Checkout
uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Run Linter
run: poetry run nox -s lint
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: .lint.txt
path: .lint.txt
type-check-job:
name: Type Checking (Python-${{ matrix.python-version }})
needs: [version-check-job]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: SCM Checkout
uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Run Type check
run: poetry run nox -s type-check
tests-job:
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
needs: [build-documentation-job, lint-job, type-check-job]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
exasol-version: ["7.1.26"]
steps:
- name: SCM Checkout
uses: actions/checkout@v4
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
large-packages: false
- name: Free disk space by removing large directories
run: |
sudo rm -rf /usr/local/graalvm/
sudo rm -rf /usr/local/.ghcup/
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /opt/ghc
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Calculate Test Coverage
run: poetry run nox -s coverage -- -- --db-version ${{ matrix.exasol-version }}
env:
PYTEST_ADDOPTS: "-W 'ignore::DeprecationWarning:luigi:'
-W 'ignore::DeprecationWarning:pkg_resources:'
-W 'ignore:pkg_resources is deprecated as an API:DeprecationWarning'
-W 'ignore:Deprecated call to \`pkg_resources.declare_namespace:DeprecationWarning'
-W 'ignore::DeprecationWarning:exasol_integration_test_docker_environment:'"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: .coverage
path: .coverage