Skip to content

Commit 62e98ce

Browse files
Merge branch 'main' into feature/add-nox-task-to-check-format
2 parents 3c82fef + 38905d2 commit 62e98ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+847
-234
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
poetry.lock linguist-generated=true

.github/workflows/cd.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ jobs:
1616
uses: ./.github/workflows/build-and-publish.yml
1717
secrets:
1818
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
19+
20+
publish-docs:
21+
needs: [ cd-job ]
22+
name: Publish Documentation
23+
uses: ./.github/workflows/gh-pages.yml
24+

.github/workflows/checks.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
fail-fast: false
4949
matrix:
50-
python-version: [ "3.9", "3.10", "3.11" ]
50+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
5151

5252
steps:
5353
- name: SCM Checkout
@@ -75,7 +75,7 @@ jobs:
7575
strategy:
7676
fail-fast: false
7777
matrix:
78-
python-version: [ "3.9", "3.10", "3.11" ]
78+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
7979

8080
steps:
8181
- name: SCM Checkout
@@ -96,7 +96,7 @@ jobs:
9696
strategy:
9797
fail-fast: false
9898
matrix:
99-
python-version: [ "3.9", "3.10", "3.11" ]
99+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
100100

101101
steps:
102102
- name: SCM Checkout
@@ -139,15 +139,15 @@ jobs:
139139
run: poetry run nox -s project:format
140140

141141
Tests:
142-
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
143-
needs: [ Documentation, Lint, Type-Check, Security, Format]
142+
name: Unit-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
143+
needs: [ Documentation, Lint, Type-Check, Security]
144144
runs-on: ubuntu-latest
145145
env:
146146
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
147147
strategy:
148148
fail-fast: false
149149
matrix:
150-
python-version: [ "3.9", "3.10", "3.11" ]
150+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
151151
exasol-version: [ "7.1.9" ]
152152

153153
steps:
@@ -160,11 +160,11 @@ jobs:
160160
python-version: ${{ matrix.python-version }}
161161

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

165165
- name: Upload Artifacts
166166
uses: actions/[email protected]
167167
with:
168-
name: coverage-python${{ matrix.python-version }}
168+
name: coverage-python${{ matrix.python-version }}-fast
169169
path: .coverage
170170
include-hidden-files: true

.github/workflows/gh-pages.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Publish Documentation
22

3-
on: workflow_call
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
46

57
jobs:
68

@@ -18,7 +20,7 @@ jobs:
1820

1921
- name: Build Documentation
2022
run: |
21-
poetry run python -m nox -s docs:multiversion
23+
poetry run nox -s docs:multiversion
2224
2325
- name: Deploy
2426
uses: JamesIves/[email protected]

.github/workflows/merge-gate.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,17 @@ jobs:
1414

1515
slow-checks:
1616
name: Slow
17-
runs-on: ubuntu-latest
18-
19-
# Even though the environment "manual-approval" will be created automatically,
20-
# it still needs to be configured to require interactive review.
21-
# See project settings on GitHub (Settings / Environments / manual-approval).
22-
environment: manual-approval
23-
24-
# Replace the steps below with the required actions
25-
# and/or add additional jobs if required
26-
# Note:
27-
# If you add additional jobs, make sure they are added as a requirement
28-
# to the approve-merge job's input requirements (needs).
29-
steps:
30-
- name: Tests
31-
run: |
32-
echo "Slow tests ran successfully"
33-
17+
uses: ./.github/workflows/slow-checks.yml
3418

3519
# This job ensures inputs have been executed successfully.
3620
approve-merge:
37-
name: Allow Merge
21+
name: Allow Merge
3822
runs-on: ubuntu-latest
3923
# If you need additional jobs to be part of the merge gate, add them below
4024
needs: [ fast-checks, slow-checks ]
4125

4226
# Each job requires a step, so we added this dummy step.
4327
steps:
44-
- name: Approve
28+
- name: Approve
4529
run: |
4630
echo "Merge Approved"

.github/workflows/report.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
- name: Copy Artifacts into Root Folder
3131
working-directory: ./artifacts
3232
run: |
33-
cp coverage-python3.9/.coverage ../
33+
poetry run coverage combine --keep coverage-python3.9*/.coverage
34+
cp .coverage ../
3435
cp lint-python3.9/.lint.txt ../
3536
cp security-python3.9/.security.json ../
3637

.github/workflows/slow-checks.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Slow-Checks
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
ALTERNATIVE_GITHUB_TOKEN:
7+
required: false
8+
9+
jobs:
10+
11+
Tests:
12+
name: Integration-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
13+
runs-on: ubuntu-latest
14+
# Even though the environment "manual-approval" will be created automatically,
15+
# it still needs to be configured to require interactive review.
16+
# See project settings on GitHub (Settings / Environments / manual-approval).
17+
environment: manual-approval
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
24+
exasol-version: [ "7.1.9" ]
25+
26+
steps:
27+
- name: SCM Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Python & Poetry Environment
31+
uses: ./.github/actions/python-environment
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Run Tests and Collect Coverage
36+
run: poetry run nox -s test:integration -- -- --coverage --db-version ${{ matrix.exasol-version }}
37+
38+
- name: Upload Artifacts
39+
uses: actions/[email protected]
40+
with:
41+
name: coverage-python${{ matrix.python-version }}-slow
42+
path: .coverage
43+
include-hidden-files: true

.import_linter_config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[importlinter]
2+
root_package = exasol.toolbox

.pre-commit-config.yaml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
default_stages: [ commit ]
1+
default_stages: [ pre-commit, pre-push ]
22
repos:
33

44
- repo: local
55
hooks:
66
- id: code-format
77
name: code-format
88
types: [ python ]
9-
files: "pyproject.toml"
109
pass_filenames: false
1110
language: system
12-
entry: poetry run nox -s fix
11+
entry: poetry run nox -s project:fix
12+
stages: [ pre-commit ]
13+
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v4.4.0
16+
hooks:
17+
- id: check-yaml
18+
stages: [ pre-commit ]
19+
- id: end-of-file-fixer
20+
stages: [ pre-commit ]
21+
- id: trailing-whitespace
22+
stages: [ pre-commit ]
1323

1424
- repo: local
1525
hooks:
@@ -18,7 +28,8 @@ repos:
1828
types: [ python ]
1929
pass_filenames: false
2030
language: system
21-
entry: poetry run nox -s type-check
31+
entry: poetry run nox -s lint:typing
32+
stages: [ pre-push ]
2233

2334
- repo: local
2435
hooks:
@@ -27,11 +38,5 @@ repos:
2738
types: [ python ]
2839
pass_filenames: false
2940
language: system
30-
entry: poetry run nox -s lint
31-
32-
- repo: https://github.com/pre-commit/pre-commit-hooks
33-
rev: v4.4.0
34-
hooks:
35-
- id: check-yaml
36-
- id: end-of-file-fixer
37-
- id: trailing-whitespace
41+
entry: poetry run nox -s lint:code
42+
stages: [ pre-push ]

doc/_static/github-workflows.png

60.1 KB
Loading

0 commit comments

Comments
 (0)