Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧪 Run tests against Python 3.13 in CI #920

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ jobs:
strategy:
matrix:
pyver:
- 3.13-dev
- 3.12
- 3.7
- 3.11
Expand All @@ -170,6 +171,14 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 15

continue-on-error: >-
${{
endsWith(matrix.pyver, '-dev')
&& true
|| false
}}

steps:
- name: Retrieve the project source from an sdist inside the GHA artifact
uses: re-actors/checkout-python-sdist@release/v1
Expand All @@ -179,6 +188,7 @@ jobs:
workflow-artifact-name: >-
${{ needs.pre-setup.outputs.dists-artifact-name }}
- name: Download distributions
if: ${{ !endsWith(matrix.pyver, '-dev') && true || false }}
uses: actions/download-artifact@v3
with:
name: ${{ needs.pre-setup.outputs.dists-artifact-name }}
Expand All @@ -189,6 +199,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyver }}
allow-prereleases: >-
${{
endsWith(matrix.pyver, '-dev')
&& true
|| false
}}
- name: Get pip cache dir
id: pip-cache
run: |
Expand Down Expand Up @@ -220,6 +236,7 @@ jobs:
with:
path: requirements/pytest.txt
- name: Determine pre-compiled compatible wheel
if: ${{ !endsWith(matrix.pyver, '-dev') && true || false }}
env:
# NOTE: When `pip` is forced to colorize output piped into `jq`,
# NOTE: the latter can't parse it. So we're overriding the color
Expand Down Expand Up @@ -258,8 +275,21 @@ jobs:
| jq --raw-output .install[].download_info.url
| tee -a "${GITHUB_OUTPUT}"
shell: bash
- name: Self-install
run: python -Im pip install '${{ steps.wheel-file.outputs.path }}'
- name: >-
Self-install (from ${{
endsWith(matrix.pyver, '-dev')
&& 'source'
|| 'wheel'
}})
env:
MULTIDICT_NO_EXTENSIONS: ${{ matrix.no-extensions }}
run: >-
python -Im
pip install '${{
endsWith(matrix.pyver, '-dev')
&& '.'
|| steps.wheel-file.outputs.path
}}'
- name: Run unittests
run: >-
python -Im pytest tests -v
Expand Down
2 changes: 2 additions & 0 deletions CHANGES/920.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
An experimental Python 3.13 job now runs in the CI
-- :user:`webknjaz`.
Loading