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

Start testing Python 3.10 #763

Merged
merged 1 commit into from
Jan 19, 2022
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
96 changes: 53 additions & 43 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,77 @@ name: Python package

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 2
uses: actions/setup-python@v2
with:
python-version: 2.7
- name: lint
run: make lint

- uses: actions/checkout@v2
- name: Set up Python 2
uses: actions/setup-python@v2
with:
python-version: "2.7"
- name: lint
run: make lint

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: fmtcheck
run: make fmtcheck
- uses: actions/checkout@v2
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: fmtcheck
run: make fmtcheck

build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy-2.7, pypy-3.7]
python-version:
[
"2.7",
"3.5",
"3.6",
"3.7",
"3.8",
"3.9",
"3.10",
"pypy-2.7",
"pypy-3.7",
]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and virtualenv to latest
run: pip install --upgrade pip virtualenv
- name: Get pip cache dir
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and virtualenv to latest
run: pip install --upgrade pip virtualenv
- name: Get pip cache dir
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
# Might be sensible to cache the docker image but this seems to be
# not fully supported by github actions yet, as of Feb 2021
# https://github.com/actions/cache/issues/81
- name: Start stripe-mock
run: docker run -d -p 12111-12112:12111-12112 stripe/stripe-mock && sleep 5
# Might be sensible to cache the docker image but this seems to be
# not fully supported by github actions yet, as of Feb 2021
# https://github.com/actions/cache/issues/81
- name: Start stripe-mock
run: docker run -d -p 12111-12112:12111-12112 stripe/stripe-mock && sleep 5

- name: Test with pytest
run: make test
- name: Test with pytest
run: make test
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
],
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ passenv = LDFLAGS CFLAGS

[testenv:fmt]
description = run code formatting using black
basepython = python3.9
basepython = python3.10
deps = black==21.10b0
commands = black . {posargs}
skip_install = true
Expand Down