Skip to content

Commit b636fa9

Browse files
authored
feat: add types (#57)
2 parents 883b454 + d97a707 commit b636fa9

File tree

7 files changed

+526
-347
lines changed

7 files changed

+526
-347
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,32 @@
11
name: Publish to PyPi
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
tags:
69
- "v*"
710

811
jobs:
9-
lint:
10-
uses: prosegrinder/.github/.github/workflows/poetry-lint.yaml@main
12+
black:
13+
uses: prosegrinder/.github/.github/workflows/poetry-black.yaml@main
14+
15+
pylint:
16+
uses: prosegrinder/.github/.github/workflows/poetry-pylint.yaml@main
17+
18+
mypy:
19+
uses: prosegrinder/.github/.github/workflows/poetry-mypy.yaml@main
20+
21+
bandit:
22+
uses: prosegrinder/.github/.github/workflows/poetry-bandit.yaml@main
1123

1224
test:
13-
needs: lint
25+
needs:
26+
- pylint
27+
- black
28+
- mypy
29+
- bandit
1430
uses: prosegrinder/.github/.github/workflows/poetry-test.yaml@main
1531

1632
publish:

.github/workflows/python-ci.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Python Poetry CI
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58

@@ -8,26 +11,28 @@ concurrency:
811
cancel-in-progress: true
912

1013
jobs:
11-
lint:
12-
uses: prosegrinder/.github/.github/workflows/poetry-lint.yaml@main
14+
black:
15+
uses: prosegrinder/.github/.github/workflows/poetry-black.yaml@main
16+
17+
pylint:
18+
uses: prosegrinder/.github/.github/workflows/poetry-pylint.yaml@main
19+
20+
mypy:
21+
uses: prosegrinder/.github/.github/workflows/poetry-mypy.yaml@main
22+
23+
bandit:
24+
uses: prosegrinder/.github/.github/workflows/poetry-bandit.yaml@main
1325

1426
test:
15-
needs: lint
27+
needs:
28+
- pylint
29+
- black
30+
- mypy
31+
- bandit
1632
uses: prosegrinder/.github/.github/workflows/poetry-test.yaml@main
1733

1834
cz-dry-run:
1935
needs: test
20-
name: "Dry run Commitizen bump"
21-
runs-on: ubuntu-latest
22-
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
25-
with:
26-
fetch-depth: 0
27-
token: "${{ secrets.GITHUB_TOKEN }}"
28-
- name: Dry-run bump and changelog
29-
uses: commitizen-tools/[email protected]
30-
with:
31-
github_token: ${{ secrets.GITHUB_TOKEN }}
32-
check_consistency: true
33-
dry_run: true
36+
uses: prosegrinder/.github/.github/workflows/poetry-cz-dry-run.yaml@main
37+
secrets:
38+
VERSION_BUMP_TAG_TOKEN: "${{ secrets.VERSION_BUMP_TAG_TOKEN }}"
Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Bump Version and Create Release
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:
@@ -10,27 +13,32 @@ concurrency:
1013
cancel-in-progress: true
1114

1215
jobs:
13-
bump-and-release:
14-
if: "!startsWith(github.event.head_commit.message, 'bump:')"
15-
runs-on: ubuntu-latest
16-
name: "Bump version and create changelog with commitizen"
17-
steps:
18-
- uses: actions/checkout@v4
19-
with:
20-
fetch-depth: 0
21-
token: "${{ secrets.VERSION_BUMP_TAG_TOKEN }}"
22-
- name: Create bump and changelog
23-
id: cz
24-
uses: commitizen-tools/[email protected]
25-
with:
26-
commit: true
27-
push: true
28-
github_token: ${{ secrets.VERSION_BUMP_TAG_TOKEN }}
29-
changelog_increment_filename: "release-body.md"
30-
- name: Create GitHub Release
31-
uses: softprops/action-gh-release@v2
32-
with:
33-
body_path: "release-body.md"
34-
tag_name: v${{ steps.cz.outputs.version }}
35-
env:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
black:
17+
uses: prosegrinder/.github/.github/workflows/poetry-black.yaml@main
18+
19+
pylint:
20+
uses: prosegrinder/.github/.github/workflows/poetry-pylint.yaml@main
21+
22+
mypy:
23+
uses: prosegrinder/.github/.github/workflows/poetry-mypy.yaml@main
24+
25+
bandit:
26+
uses: prosegrinder/.github/.github/workflows/poetry-bandit.yaml@main
27+
28+
test:
29+
needs:
30+
- pylint
31+
- black
32+
- mypy
33+
- bandit
34+
uses: prosegrinder/.github/.github/workflows/poetry-test.yaml@main
35+
36+
release:
37+
needs: test
38+
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
39+
# Don't run 'bump:'
40+
permissions:
41+
contents: write
42+
uses: prosegrinder/.github/.github/workflows/poetry-release.yaml@main
43+
secrets:
44+
VERSION_BUMP_TAG_TOKEN: "${{ secrets.VERSION_BUMP_TAG_TOKEN }}"

0 commit comments

Comments
 (0)