Test on Python 3.11, upgrade workflows

This commit is contained in:
Simon Willison 2022-11-21 22:35:34 -08:00
commit aea4d3fd50
2 changed files with 14 additions and 16 deletions

View file

@ -4,20 +4,22 @@ on:
release:
types: [created]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: '**/setup.py'
- name: Install dependencies
run: |
pip install -e '.[test]'
@ -28,13 +30,12 @@ jobs:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.11"
cache: pip
cache-dependency-path: '**/setup.py'
- name: Install dependencies
run: |
pip install setuptools wheel twine build

View file

@ -1,29 +1,26 @@
name: Test
on:
push:
workflow_dispatch:
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
if: hashFiles('setup.py')
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: '**/setup.py'
- name: Install dependencies
if: hashFiles('setup.py')
run: |
pip install -e '.[test]'
- name: Run tests
if: hashFiles('setup.py')
run: |
pytest