Skip to content

Commit 3d0f7b6

Browse files
committed
Provide possibility to pass GITHUB_TOKEN to check workflow
1 parent 5d1a51b commit 3d0f7b6

File tree

3 files changed

+75
-33
lines changed

3 files changed

+75
-33
lines changed

.github/workflows/checks.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Checks
22

3-
on: workflow_call
3+
on:
4+
workflow_call:
5+
secrets:
6+
GITHUB_TOKEN:
7+
required: false
48

59
jobs:
610

@@ -22,28 +26,28 @@ jobs:
2226

2327
build-documentation-job:
2428
name: Build Documentation
25-
needs: [version-check-job]
29+
needs: [ version-check-job ]
2630
runs-on: ubuntu-latest
2731

2832
steps:
29-
- name: SCM Checkout
30-
uses: actions/checkout@v3
33+
- name: SCM Checkout
34+
uses: actions/checkout@v3
3135

32-
- name: Setup Python & Poetry Environment
33-
uses: exasol/python-toolbox/.github/actions/python-environment@main
36+
- name: Setup Python & Poetry Environment
37+
uses: exasol/python-toolbox/.github/actions/python-environment@main
3438

35-
- name: Build Documentation
36-
run: |
37-
poetry run python -m nox -s build-docs
39+
- name: Build Documentation
40+
run: |
41+
poetry run python -m nox -s build-docs
3842
3943
lint-job:
4044
name: Linting (Python-${{ matrix.python-version }})
41-
needs: [version-check-job]
45+
needs: [ version-check-job ]
4246
runs-on: ubuntu-latest
4347
strategy:
4448
fail-fast: false
4549
matrix:
46-
python-version: ["3.8", "3.9", "3.10", "3.11"]
50+
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
4751

4852
steps:
4953
- name: SCM Checkout
@@ -59,12 +63,12 @@ jobs:
5963

6064
type-check-job:
6165
name: Type Checking (Python-${{ matrix.python-version }})
62-
needs: [version-check-job]
66+
needs: [ version-check-job ]
6367
runs-on: ubuntu-latest
6468
strategy:
6569
fail-fast: false
6670
matrix:
67-
python-version: ["3.8", "3.9", "3.10", "3.11"]
71+
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
6872

6973
steps:
7074
- name: SCM Checkout
@@ -80,13 +84,13 @@ jobs:
8084

8185
tests-job:
8286
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
83-
needs: [build-documentation-job, lint-job, type-check-job]
87+
needs: [ build-documentation-job, lint-job, type-check-job ]
8488
runs-on: ubuntu-latest
8589
strategy:
8690
fail-fast: false
8791
matrix:
88-
python-version: ["3.8", "3.9", "3.10", "3.11"]
89-
exasol-version: ["7.1.9"]
92+
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
93+
exasol-version: [ "7.1.9" ]
9094

9195
steps:
9296
- name: SCM Checkout
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. A new scriv changelog fragment.
2+
..
3+
.. Uncomment the header that is right (remove the leading dots).
4+
..
5+
.. 🗑️ Removed
6+
.. ----------
7+
..
8+
.. - A bullet item for the Removed category.
9+
..
10+
✨ Added
11+
---------
12+
- Added support for passing GITHUB_TOKEN to check workflow
13+
.. - A bullet item for the Added category.
14+
..
15+
.. 🔧 Changed
16+
.. -----------
17+
..
18+
.. - A bullet item for the Changed category.
19+
..
20+
.. 🚧 Deprecated
21+
.. --------------
22+
..
23+
.. - A bullet item for the Deprecated category.
24+
..
25+
.. 🐞 Fixed
26+
.. ---------
27+
..
28+
.. - A bullet item for the Fixed category.
29+
..
30+
.. 🔐 Security
31+
.. -----------
32+
..
33+
.. - A bullet item for the Security category.
34+
..

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

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Checks
22

3-
on: workflow_call
3+
on:
4+
workflow_call:
5+
secrets:
6+
GITHUB_TOKEN:
7+
required: false
48

59
jobs:
610

@@ -18,32 +22,32 @@ jobs:
1822
uses: exasol/python-toolbox/.github/actions/python-environment@main
1923

2024
- name: Check Version(s)
21-
run: poetry run version-check exasol/toolbox/version.py
25+
run: poetry run version-check `poetry run python -c "from noxconfig import PROJECT_CONFIG; print(PROJECT_CONFIG.version_file)"`
2226

2327
build-documentation-job:
2428
name: Build Documentation
25-
needs: [version-check-job]
29+
needs: [ version-check-job ]
2630
runs-on: ubuntu-latest
2731

2832
steps:
29-
- name: SCM Checkout
30-
uses: actions/checkout@v3
33+
- name: SCM Checkout
34+
uses: actions/checkout@v3
3135

32-
- name: Setup Python & Poetry Environment
33-
uses: exasol/python-toolbox/.github/actions/python-environment@main
36+
- name: Setup Python & Poetry Environment
37+
uses: exasol/python-toolbox/.github/actions/python-environment@main
3438

35-
- name: Build Documentation
36-
run: |
37-
poetry run python -m nox -s build-docs
39+
- name: Build Documentation
40+
run: |
41+
poetry run python -m nox -s build-docs
3842
3943
lint-job:
4044
name: Linting (Python-${{ matrix.python-version }})
41-
needs: [version-check-job]
45+
needs: [ version-check-job ]
4246
runs-on: ubuntu-latest
4347
strategy:
4448
fail-fast: false
4549
matrix:
46-
python-version: ["3.8", "3.9", "3.10", "3.11"]
50+
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
4751

4852
steps:
4953
- name: SCM Checkout
@@ -59,12 +63,12 @@ jobs:
5963

6064
type-check-job:
6165
name: Type Checking (Python-${{ matrix.python-version }})
62-
needs: [version-check-job]
66+
needs: [ version-check-job ]
6367
runs-on: ubuntu-latest
6468
strategy:
6569
fail-fast: false
6670
matrix:
67-
python-version: ["3.8", "3.9", "3.10", "3.11"]
71+
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
6872

6973
steps:
7074
- name: SCM Checkout
@@ -80,13 +84,13 @@ jobs:
8084

8185
tests-job:
8286
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
83-
needs: [build-documentation-job, lint-job, type-check-job]
87+
needs: [ build-documentation-job, lint-job, type-check-job ]
8488
runs-on: ubuntu-latest
8589
strategy:
8690
fail-fast: false
8791
matrix:
88-
python-version: ["3.8", "3.9", "3.10", "3.11"]
89-
exasol-version: ["7.1.9"]
92+
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
93+
exasol-version: [ "7.1.9" ]
9094

9195
steps:
9296
- name: SCM Checkout

0 commit comments

Comments
 (0)