Skip to content

Commit

Permalink
Test against Python 3.11 (#399)
Browse files Browse the repository at this point in the history
* Test against Python 3.11

* Workaround to fix Python 3.11 (#416)

* Allow testing feature branches, enable manual trigger and add colour to logs

* Workaround for Python 3.11

* Remove unused deadsnakes/action

* Bump actions to v3

* Bump actions/cache to v3

Co-authored-by: Hugo van Kemenade <[email protected]>
  • Loading branch information
Mariatta and hugovk authored Apr 12, 2022
1 parent c5765fa commit de6de35
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Tests

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

env:
FORCE_COLOR: 1

jobs:
test:
Expand All @@ -13,26 +13,32 @@ jobs:

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11.0-alpha - 3.11.0"]

steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-{{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('dev-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/setup-python@v2
if: "!endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}
- uses: deadsnakes/[email protected]
if: endsWith(matrix.python-version, '-dev')
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: python3 -m pip install coverage -U pip -r dev-requirements.txt
run: |
python3 -m pip install coverage -U pip
python3 -m pip install coverage -U wheel
python3 -m pip install coverage -U -r dev-requirements.txt
env:
# TEMP for 3.11
# https://github.com/aio-libs/aiohttp/issues/6600
AIOHTTP_NO_EXTENSIONS: 1
# https://github.com/aio-libs/frozenlist/issues/285
FROZENLIST_NO_EXTENSIONS: 1
# https://github.com/aio-libs/yarl/issues/680
YARL_NO_EXTENSIONS: 1
- name: Run Tests
run: pytest --cov --cov-report=xml
- uses: codecov/codecov-action@v2
Expand Down

0 comments on commit de6de35

Please sign in to comment.