Add Python 3.13 support #387
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python pytest | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
paths: | |
- 'wikibaseintegrator/**.py' | |
- 'test/**.py' | |
- 'pyproject.toml' | |
- 'poetry.lock' | |
pull_request: | |
branches: [ '**' ] | |
paths: | |
- 'wikibaseintegrator/**.py' | |
- 'test/**.py' | |
- 'pyproject.toml' | |
- 'poetry.lock' | |
jobs: | |
build: | |
name: pytest ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
container: ubuntu | |
services: | |
httpstatus: | |
image: kennethreitz/httpbin | |
ports: | |
- 80:80 | |
strategy: | |
matrix: | |
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev' ] | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- name: Install pipx | |
run: apt update && apt install -y pipx && pipx ensurepath | |
- name: Update path | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5.1.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'poetry' | |
# Need to install poetry again in the new python version | |
- name: Install poetry | |
run: python -m pip install poetry | |
- name: Install dependencies | |
run: | | |
python -m poetry install --with dev | |
- name: Test with pytest | |
run: | | |
python -m poetry run pytest | |
env: | |
HTTPSTATUS_SERVICE: "http://httpstatus" |