Skip to content

Commit 8e17bc2

Browse files
authored
Improve CI Scripts (#30)
This fixes various smaller issues with the current CI Scrips: - Better Naming of lint jobs - Split mypy and black to different steps for better errors - Run black if mypy fails - Run flake on Python 3.12 - Update versions of actions in relase script
1 parent 367e415 commit 8e17bc2

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/lint.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ on:
1111

1212
jobs:
1313
multiversion:
14+
name: flake8 checks
1415
runs-on: ubuntu-latest
1516
strategy:
1617
fail-fast: false
1718
matrix:
18-
python-version: ["3.8", "3.9", "3.10", "3.11"]
19+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1920

2021
steps:
2122
- uses: actions/checkout@v4
@@ -34,10 +35,8 @@ jobs:
3435
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3536
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3637
singleversion:
38+
name: MyPy and Black checks
3739
runs-on: ubuntu-latest
38-
strategy:
39-
fail-fast: false
40-
4140
steps:
4241
- uses: actions/checkout@v4
4342
- name: Set up Python 3.12
@@ -49,6 +48,8 @@ jobs:
4948
python -m pip install --upgrade pip
5049
python -m pip install mypy black pytest
5150
- name: Validate types with mypy
52-
run: |
53-
mypy .
54-
black --check .
51+
run: mypy .
52+
- name: Check formatting with black
53+
# Run Job even if mypy fails. This would also run if a previous step failed, but that shouldn't happen
54+
if: always()
55+
run: black --check .

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616
- name: Set up Python
17-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.9"
2020
- name: Install pypa/build
2121
run: python3 -m pip install build --user
2222
- name: Build a binary wheel and a source tarball
2323
run: python3 -m build
2424
- name: Store the distribution packages
25-
uses: actions/upload-artifact@v3
25+
uses: actions/upload-artifact@v4
2626
with:
2727
name: python-package-distributions
2828
path: dist/
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: Download all the dists
42-
uses: actions/download-artifact@v3
42+
uses: actions/download-artifact@v4
4343
with:
4444
name: python-package-distributions
4545
path: dist/

0 commit comments

Comments
 (0)