Skip to content

Commit a98ab06

Browse files
committed
Update workflow templates
1 parent bd5c0d3 commit a98ab06

File tree

5 files changed

+106
-13
lines changed

5 files changed

+106
-13
lines changed

exasol/toolbox/templates/github/workflows/checks.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,17 @@ jobs:
4646
run: |
4747
poetry run python -m nox -s docs:build
4848
49+
build-matrix:
50+
name: Generate Build Matrix
51+
uses: ./.github/workflows/matrix-python.yml
52+
4953
Lint:
5054
name: Linting (Python-${{ matrix.python-version }})
5155
needs: [ Version-Check ]
5256
runs-on: ubuntu-latest
5357
strategy:
5458
fail-fast: false
55-
matrix:
56-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
59+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
5760

5861
steps:
5962
- name: SCM Checkout
@@ -80,8 +83,7 @@ jobs:
8083
runs-on: ubuntu-latest
8184
strategy:
8285
fail-fast: false
83-
matrix:
84-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
86+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
8587

8688
steps:
8789
- name: SCM Checkout
@@ -101,8 +103,7 @@ jobs:
101103
runs-on: ubuntu-latest
102104
strategy:
103105
fail-fast: false
104-
matrix:
105-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
106+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
106107

107108
steps:
108109
- name: SCM Checkout
@@ -135,6 +136,7 @@ jobs:
135136
uses: exasol/python-toolbox/.github/actions/[email protected]
136137
with:
137138
python-version: "3.9"
139+
138140
- name: Run format check
139141
run: poetry run nox -s project:format
140142

@@ -146,9 +148,7 @@ jobs:
146148
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
147149
strategy:
148150
fail-fast: false
149-
matrix:
150-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
151-
exasol-version: ["7.1.9"]
151+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
152152

153153
steps:
154154
- name: SCM Checkout
@@ -160,7 +160,7 @@ jobs:
160160
python-version: ${{ matrix.python-version }}
161161

162162
- name: Run Tests and Collect Coverage
163-
run: poetry run nox -s test:unit -- -- --coverage --db-version ${{ matrix.exasol-version }}
163+
run: poetry run nox -s test:unit -- -- --coverage
164164

165165
- name: Upload Artifacts
166166
uses: actions/[email protected]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Matrix (All Versions)
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
matrix:
7+
description: "Generates the all versions build matrix"
8+
value: ${{ jobs.all_versions.outputs.matrix }}
9+
10+
jobs:
11+
all_versions:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: SCM Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python & Poetry Environment
20+
uses: exasol/python-toolbox/.github/actions/[email protected]
21+
22+
- name: Generate matrix
23+
run: poetry run nox -s matrix:all
24+
25+
- id: set-matrix
26+
run: |
27+
echo "matrix=$(poetry run nox -s matrix:all)" >> $GITHUB_OUTPUT
28+
29+
outputs:
30+
matrix: ${{ steps.set-matrix.outputs.matrix }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Matrix (Exasol)
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
matrix:
7+
description: "Generates the exasol version build matrix"
8+
value: ${{ jobs.exasol_versions.outputs.matrix }}
9+
10+
jobs:
11+
exasol_versions:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: SCM Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python & Poetry Environment
20+
uses: exasol/python-toolbox/.github/actions/[email protected]
21+
22+
- name: Generate matrix
23+
run: poetry run nox -s matrix:exasol
24+
25+
- id: set-matrix
26+
run: |
27+
echo "matrix=$(poetry run nox -s matrix:exasol)" >> $GITHUB_OUTPUT
28+
29+
outputs:
30+
matrix: ${{ steps.set-matrix.outputs.matrix }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Matrix (Python)
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
matrix:
7+
description: "Generates the python version build matrix"
8+
value: ${{ jobs.python_versions.outputs.matrix }}
9+
10+
jobs:
11+
python_versions:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: SCM Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python & Poetry Environment
20+
uses: exasol/python-toolbox/.github/actions/[email protected]
21+
22+
- name: Generate matrix
23+
run: poetry run nox -s matrix:python
24+
25+
- id: set-matrix
26+
run: |
27+
echo "matrix=$(poetry run nox -s matrix:python)" >> $GITHUB_OUTPUT
28+
29+
outputs:
30+
matrix: ${{ steps.set-matrix.outputs.matrix }}

exasol/toolbox/templates/github/workflows/slow-checks.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ on:
88

99
jobs:
1010

11+
build-matrix:
12+
name: Generate Build Matrix
13+
uses: ./.github/workflows/matrix-all.yml
14+
1115
Tests:
1216
name: Integration-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
17+
needs: [ build-matrix ]
1318
runs-on: ubuntu-latest
1419
# Even though the environment "manual-approval" will be created automatically,
1520
# it still needs to be configured to require interactive review.
@@ -19,9 +24,7 @@ jobs:
1924
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
2025
strategy:
2126
fail-fast: false
22-
matrix:
23-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
24-
exasol-version: [ "7.1.9" ]
27+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
2528

2629
steps:
2730
- name: SCM Checkout

0 commit comments

Comments
 (0)