2222jobs :
2323 code-quality :
2424 name : Lint code and check type hints
25- runs-on : ubuntu-latest
25+ runs-on : ubuntu-22.04
2626 steps :
2727 - uses : actions/checkout@v4
28- - name : Setup Python 3.8
28+ - name : Setup Python 3.9
2929 uses : ./.github/actions/python
3030 with :
31- python_version : 3.8
31+ python_version : 3.9
3232 - uses : actions/cache@v4
3333 with :
3434 path : ~/.cache/pre-commit
3535 key : pre-commit-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }}
3636 - name : Lint Code
3737 run : |
3838 pre-commit run --all --show-diff-on-failure
39- python build_scripts/run_pylint.py | (pylint-json2html -f jsonextended -o pylint.html)
39+ ruff check src/ --fix
4040 shell : bash
4141 - name : Generate mypy cache key
4242 id : generate-mypy-cache-key
@@ -52,16 +52,16 @@ jobs:
5252
5353 docs :
5454 name : Build Docs
55- runs-on : ubuntu-latest
55+ runs-on : ubuntu-22.04
5656 steps :
5757 - uses : actions/checkout@v4
5858 with :
5959 fetch-depth : 0
6060 lfs : true
61- - name : Setup Python 3.8
61+ - name : Setup Python 3.9
6262 uses : ./.github/actions/python
6363 with :
64- python_version : 3.8
64+ python_version : 3.9
6565 - name : Install Pandoc
6666 uses : r-lib/actions/setup-pandoc@v2
6767 with :
@@ -73,10 +73,11 @@ jobs:
7373 strategy :
7474 fail-fast : false
7575 matrix :
76- python_version : ["3.8 ", "3.9 ", "3.10 ", "3.11 "]
76+ python_version : ["3.9 ", "3.10 ", "3.11 ", "3.12 "]
7777 group_number : [1, 2, 3, 4]
7878 name : Run Tests - Python ${{ matrix.python_version }} - Group ${{ matrix.group_number }}
7979 uses : ./.github/workflows/run-tests-workflow.yaml
80+ secrets : inherit
8081 with :
8182 split_size : 4
8283 group_number : ${{ matrix.group_number }}
8788 strategy :
8889 fail-fast : false
8990 matrix :
90- python_version : ["3.8 ", "3.9 ", "3.10 ", "3.11 "]
91+ python_version : ["3.9 ", "3.10 ", "3.11 ", "3.12 "]
9192 group_number : [1, 2, 3, 4]
9293 name : Run Notebook tests - Python ${{ matrix.python_version }} - Group ${{ matrix.group_number }}
9394 uses : ./.github/workflows/run-notebook-tests-workflow.yaml
@@ -97,41 +98,79 @@ jobs:
9798 group_number : ${{ matrix.group_number }}
9899 needs : [code-quality]
99100
100- push-docs-and-release-testpypi :
101- name : Push Docs and maybe release Package to TestPyPI
102- runs-on : ubuntu-latest
101+ legacy-tests :
102+ strategy :
103+ fail-fast : false
104+ matrix :
105+ python_version : [ "3.11" ]
106+ group_number : [ 1, 2, 3, 4 ]
107+ name : Run Legacy tests - Python ${{ matrix.python_version }} - Group ${{ matrix.group_number }}
108+ uses : ./.github/workflows/run-legacy-tests-workflow.yaml
109+ with :
110+ python_version : ${{ matrix.python_version }}
111+ split_size : 4
112+ group_number : ${{ matrix.group_number }}
113+ needs : [ code-quality ]
114+
115+ publish-docs :
116+ name : Publish documentation
117+ runs-on : ubuntu-22.04
103118 needs : [docs, group-tests, notebook-tests]
104- if : ${{ github.ref == 'refs/heads/develop' }}
119+ if : ${{ github.ref == 'refs/heads/develop' && github.event_name != 'pull_request' }}
105120 concurrency :
106- group : publish
121+ group : publish-docs
107122 steps :
108123 - uses : actions/checkout@v4
109124 with :
110125 fetch-depth : 0
111126 lfs : true
112- - name : Setup Python 3.8
127+ - name : Setup Python 3.9
113128 uses : ./.github/actions/python
114129 with :
115- python_version : 3.8
130+ python_version : 3.9
116131 - name : Install Pandoc
117132 uses : r-lib/actions/setup-pandoc@v2
118133 with :
119134 pandoc-version : ${{ env.PANDOC_VERSION }}
120- - name : Deploy Docs
135+ - name : Deploy docs
121136 uses : ./.github/actions/deploy-docs
122137 with :
123138 version : devel
124139 alias : develop
125140 title : Development
126141 email : ${{ env.GITHUB_BOT_EMAIL }}
127142 username : ${{ env.GITHUB_BOT_USERNAME }}
128- - name : Build and publish to TestPyPI
129- env :
130- TWINE_USERNAME : __token__
131- TWINE_PASSWORD : ${{ secrets.TEST_PYPI_PASSWORD }}
143+
144+
145+ publish-testpypi :
146+ name : Publish package to TestPyPI
147+ runs-on : ubuntu-22.04
148+ needs : [group-tests, notebook-tests]
149+ if : ${{ github.ref == 'refs/heads/develop' && github.event_name != 'pull_request' }}
150+ concurrency :
151+ group : publish-testpypi
152+ permissions :
153+ id-token : write
154+ environment :
155+ name : testpypi
156+ steps :
157+ - uses : actions/checkout@v4
158+ with :
159+ fetch-depth : 0
160+ lfs : true
161+ - name : Setup Python 3.9
162+ uses : ./.github/actions/python
163+ with :
164+ python_version : 3.9
165+ - name : Bump version and build package
132166 run : |
133167 set -x
134168 export BUILD_NUMBER=$GITHUB_RUN_NUMBER
135169 bump2version --no-tag --no-commit --verbose --serialize '{major}.{minor}.{patch}.{release}{$BUILD_NUMBER}' boguspart
136170 python setup.py sdist bdist_wheel
137- twine upload -r testpypi --verbose --non-interactive dist/*
171+ - name : Publish to TestPyPI
172+ uses : pypa/gh-action-pypi-publish@release/v1
173+ with :
174+ repository-url : https://test.pypi.org/legacy/
175+ print-hash : true
176+ verbose : true
0 commit comments