Skip to content

Commit 9500067

Browse files
Merge branch 'main' into update-changes-#74
2 parents 8477693 + 5cca213 commit 9500067

26 files changed

+417
-338
lines changed

exasol/toolbox/templates/github/workflows/ci-cd.yml renamed to .github/workflows/cd.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI/CD
1+
name: CD
22

33
on:
44
push:
@@ -11,19 +11,8 @@ jobs:
1111
name: Check Release Tag
1212
uses: ./.github/workflows/check-release-tag.yml
1313

14-
ci-job:
15-
name: Checks
16-
needs: [ check-tag-version-job ]
17-
uses: ./.github/workflows/checks.yml
18-
secrets: inherit
19-
2014
cd-job:
2115
name: Continuous Delivery
22-
needs: [ ci-job ]
2316
uses: ./.github/workflows/build-and-publish.yml
2417
secrets:
2518
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
26-
27-
metrics:
28-
needs: [ ci-job ]
29-
uses: ./.github/workflows/report.yml

.github/workflows/checks.yml

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

99
jobs:
1010

11-
version-check-job:
12-
name: Version Check
11+
Version-Check:
12+
name: Version
1313
runs-on: ubuntu-latest
1414

1515
steps:
@@ -24,9 +24,9 @@ jobs:
2424
- name: Check Version(s)
2525
run: poetry run version-check `poetry run python -c "from noxconfig import PROJECT_CONFIG; print(PROJECT_CONFIG.version_file)"`
2626

27-
build-documentation-job:
28-
name: Build Documentation
29-
needs: [ version-check-job ]
27+
Documentation:
28+
name: Docs
29+
needs: [ Version-Check ]
3030
runs-on: ubuntu-latest
3131

3232
steps:
@@ -40,9 +40,9 @@ jobs:
4040
run: |
4141
poetry run python -m nox -s build-docs
4242
43-
lint-job:
43+
Lint:
4444
name: Linting (Python-${{ matrix.python-version }})
45-
needs: [ version-check-job ]
45+
needs: [ Version-Check ]
4646
runs-on: ubuntu-latest
4747
strategy:
4848
fail-fast: false
@@ -68,9 +68,9 @@ jobs:
6868
path: .lint.txt
6969
include-hidden-files: true
7070

71-
type-check-job:
71+
Type-Check:
7272
name: Type Checking (Python-${{ matrix.python-version }})
73-
needs: [ version-check-job ]
73+
needs: [ Version-Check ]
7474
runs-on: ubuntu-latest
7575
strategy:
7676
fail-fast: false
@@ -89,9 +89,9 @@ jobs:
8989
- name: Run type-check
9090
run: poetry run nox -s type-check
9191

92-
security-job:
93-
name: Security Checking (Python-${{ matrix.python-version }})
94-
needs: [ version-check-job ]
92+
Security:
93+
name: Security Checks (Python-${{ matrix.python-version }})
94+
needs: [ Version-Check ]
9595
runs-on: ubuntu-latest
9696
strategy:
9797
fail-fast: false
@@ -107,7 +107,7 @@ jobs:
107107
with:
108108
python-version: ${{ matrix.python-version }}
109109

110-
- name: Run security
110+
- name: Run security linter
111111
run: poetry run nox -s security
112112

113113
- name: Upload Artifacts
@@ -117,9 +117,9 @@ jobs:
117117
path: .security.json
118118
include-hidden-files: true
119119

120-
tests-job:
120+
Tests:
121121
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
122-
needs: [ build-documentation-job, lint-job, type-check-job ]
122+
needs: [ Documentation, Lint, Type-Check, Security]
123123
runs-on: ubuntu-latest
124124
env:
125125
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ on:
88
- "main"
99
- "master"
1010
pull_request:
11-
types: [ opened, reopened ]
11+
types: [opened, reopened]
1212
schedule:
1313
# “At 00:00 on every 7th day-of-month from 1 through 31.” (https://crontab.guru)
1414
- cron: "0 0 1/7 * *"
1515

1616
jobs:
17-
ci-job:
18-
uses: ./.github/workflows/checks.yml
1917

20-
metrics:
21-
needs: [ ci-job ]
18+
CI:
19+
uses: ./.github/workflows/merge-gate.yml
20+
secrets: inherit
21+
22+
Metrics:
23+
needs: [ CI ]
2224
uses: ./.github/workflows/report.yml

.github/workflows/merge-gate.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Merge-Gate
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
ALTERNATIVE_GITHUB_TOKEN:
7+
required: false
8+
9+
jobs:
10+
11+
fast-checks:
12+
name: Fast
13+
uses: ./.github/workflows/checks.yml
14+
15+
slow-checks:
16+
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+
34+
35+
# This job ensures inputs have been executed successfully.
36+
approve-merge:
37+
name: Allow Merge
38+
runs-on: ubuntu-latest
39+
# If you need additional jobs to be part of the merge gate, add them below
40+
needs: [ fast-checks, slow-checks ]
41+
42+
# Each job requires a step, so we added this dummy step.
43+
steps:
44+
- name: Approve
45+
run: |
46+
echo "Merge Approved"

.github/workflows/report.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ on:
88

99
jobs:
1010

11-
report:
12-
name: Generate Status Report
11+
Report:
1312
runs-on: ubuntu-latest
1413
env:
1514
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

doc/_static/ci-cd-workflow.png

-82.9 KB
Binary file not shown.

doc/_static/ci-workflow.png

-75.4 KB
Binary file not shown.

doc/_static/pr-merge-workflow.png

-80.9 KB
Binary file not shown.

doc/changes/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
* [unreleased](unreleased.md)
4+
* [0.15.0](changes_0.15.0.md)
45
* [0.14.0](changes_0.14.0.md)
56
* [0.13.0](changes_0.13.0.md)
67
* [0.12.0](changes_0.12.0.md)
@@ -23,6 +24,7 @@
2324
hidden:
2425
---
2526
unreleased
27+
changes_0.15.0
2628
changes_0.14.0
2729
changes_0.13.0
2830
changes_0.12.0

doc/changes/changes_0.15.0.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 0.15.0 - 2024-09-27
2+
3+
## ✨ Added
4+
5+
* Added cookiecutter-template for creating new project
6+
* [#246](https://github.com/exasol/python-toolbox/issues/246): Added standard branch protection workflow
7+
* #74: Added security linter nox task
8+
9+
## 🐞 Bug Fixes
10+
11+
* [#181](https://github.com/exasol/python-toolbox/issues/181): Updated metrics related workflows
12+
* [#225](https://github.com/exasol/python-toolbox/issues/225): Fixed broken reference to version file in workflow
13+
* Fixed coverage for empty project
14+
15+
## ⚒️ Refactorings
16+
17+
* [#219](https://github.com/exasol/python-toolbox/issues/219): Updated project template configuration
18+
* Updated actions/checkout to v4
19+
20+
## 📚 Documentation
21+
* Add Python Styleguide
22+
* Add Issue Guide
23+
* Updated User Documentation
24+
25+
## 🔩 Internal
26+
27+
* Update depdency constraints
28+
* Relock dependencies

0 commit comments

Comments
 (0)