Skip to content

Commit 87009e3

Browse files
authored
Refactored GitHub workflows (#40)
* Update GitHub workflows * fixed version check
1 parent 995b259 commit 87009e3

File tree

8 files changed

+34
-67
lines changed

8 files changed

+34
-67
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Setup Python & Poetry Environment
20-
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0
20+
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0
2121

2222
- name: Build Artifacts
2323
run: poetry build
@@ -34,4 +34,5 @@ jobs:
3434
run: >
3535
gh release create ${GITHUB_REF_NAME}
3636
--title ${GITHUB_REF_NAME}
37+
--notes-file ./doc/changes/changes_${GITHUB_REF_NAME}.md
3738
dist/*

.github/workflows/check-release-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: Setup Python & Poetry Environment
17-
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0
17+
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0
1818

1919
- name: Check Tag Version
2020
# make sure the pushed/created tag matched the project version

.github/workflows/checks.yml

Lines changed: 11 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,29 @@ name: Checks
33
on: workflow_call
44

55
jobs:
6+
67
version-check-job:
7-
name: Version Check
8+
name: Version Check & Build Documentation
89
runs-on: ubuntu-latest
910

1011
steps:
11-
1212
- name: SCM Checkout
1313
uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
1616

1717
- name: Setup Python & Poetry Environment
18-
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0
18+
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0
1919

2020
- name: Check Version(s)
2121
run: poetry run version-check version.py
2222

23-
build-documentation-job:
24-
name: Build Documentation
25-
needs: [version-check-job]
26-
runs-on: ubuntu-latest
27-
28-
steps:
29-
- name: SCM Checkout
30-
uses: actions/checkout@v4
31-
32-
- name: Setup Python & Poetry Environment
33-
uses: exasol/python-toolbox/.github/actions/[email protected]
34-
35-
- name: Build Documentation
36-
run: |
37-
poetry run python -m nox -s build-docs
23+
- name: Build Documentation
24+
run: |
25+
poetry run python -m nox -s build-docs
3826
3927
lint-job:
40-
name: Linting (Python-${{ matrix.python-version }})
28+
name: Linting and Type Checks (Python-${{ matrix.python-version }})
4129
needs: [version-check-job]
4230
runs-on: ubuntu-latest
4331
strategy:
@@ -50,50 +38,18 @@ jobs:
5038
uses: actions/checkout@v4
5139

5240
- name: Setup Python & Poetry Environment
53-
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0
41+
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0
5442
with:
5543
python-version: ${{ matrix.python-version }}
5644

5745
- name: Run Tests
5846
run: poetry run nox -s lint
5947

48+
- name: Run type-check
49+
run: poetry run nox -s type-check
50+
6051
- name: Upload Artifacts
6152
uses: actions/upload-artifact@v3
6253
with:
6354
name: .lint.txt
6455
path: .lint.txt
65-
66-
type-check-job:
67-
name: Type Checking (Python-${{ matrix.python-version }})
68-
needs: [version-check-job]
69-
runs-on: ubuntu-latest
70-
strategy:
71-
fail-fast: false
72-
matrix:
73-
python-version: ["3.10", "3.11"]
74-
75-
steps:
76-
- name: SCM Checkout
77-
uses: actions/checkout@v4
78-
79-
- name: Setup Python & Poetry Environment
80-
uses: exasol/python-toolbox/.github/actions/[email protected]
81-
with:
82-
python-version: ${{ matrix.python-version }}
83-
84-
- name: Run Tests
85-
run: poetry run nox -s type-check
86-
87-
tests-job:
88-
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
89-
needs: [build-documentation-job, lint-job, type-check-job]
90-
uses: ./.github/workflows/run-tests.yml
91-
strategy:
92-
fail-fast: false
93-
matrix:
94-
python-version: ["3.10", "3.11"]
95-
exasol-version: ["7.1.9"]
96-
secrets: inherit
97-
with:
98-
python-version: ${{ matrix.python-version }}
99-
exasol-version: ${{ matrix.exasol-version }}

.github/workflows/ci.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,32 @@ on:
1313

1414
jobs:
1515

16-
ci-job:
16+
check-job:
1717
name: Checks
1818
uses: ./.github/workflows/checks.yml
1919
secrets: inherit
2020

21+
tests-job:
22+
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
23+
needs: [check-job]
24+
uses: ./.github/workflows/run-tests.yml
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
python-version: ["3.10", "3.11"]
29+
exasol-version: ["7.1.9"]
30+
secrets: inherit
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
exasol-version: ${{ matrix.exasol-version }}
34+
2135
metrics:
22-
needs: [ ci-job ]
36+
needs: [ tests-job ]
2337
uses: ./.github/workflows/report.yml
2438

2539
gate-1:
2640
name: Gate 1 - Regular CI
27-
needs: [ ci-job ]
41+
needs: [ tests-job ]
2842
runs-on: ubuntu-latest
2943
steps:
3044
- name: Branch Protection

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
uses: actions/checkout@v4
1313

1414
- name: Setup Python & Poetry Environment
15-
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0
15+
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0
1616

1717
- name: Build Documentation
1818
run: |

.github/workflows/pr-merge.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,3 @@ jobs:
1111
publish-docs:
1212
name: Publish Documentation
1313
uses: ./.github/workflows/gh-pages.yml
14-
15-
metrics:
16-
needs: [ ci-job ]
17-
uses: ./.github/workflows/report.yml

.github/workflows/report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fetch-depth: 0
2222

2323
- name: Setup Python & Poetry Environment
24-
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0
24+
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0
2525

2626
- name: Download Artifacts
2727
uses: actions/download-artifact@v3

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@v4
3030

3131
- name: Setup Python & Poetry Environment
32-
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0
32+
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0
3333
with:
3434
python-version: ${{ inputs.python-version }}
3535

0 commit comments

Comments
 (0)