Switch Linux PR tests to GitHub Actions
MODIFY
.github/workflows/ci.yml
.github/workflows/ci.yml
@@ -42,16 +42,22 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [3.6, 3.7, 3.8]
- os: [macos-latest, windows-latest]
+ python-version: [3.6, 3.7, 3.8, 3.9]
+ os: [macos-latest, windows-latest, ubuntu-latest]
experimental: [false]
+ nox-session: ['']
include:
- - python-version: 3.9
- os: macos-latest
- experimental: true
+ - python-version: pypy3
+ os: ubuntu-latest
+ experimental: false
+ nox-session: test-pypy
+ - python-version: 3.7
+ os: ubuntu-latest
+ experimental: false
+ nox-session: google_brotli
runs-on: ${{ matrix.os }}
- name: ${{ fromJson('{"macos-latest":"macOS","windows-latest":"Windows"}')[matrix.os] }} (${{ matrix.python-version }})
+ name: ${{ fromJson('{"macos-latest":"macOS","windows-latest":"Windows","ubuntu-latest":"Ubuntu"}')[matrix.os] }} ${{ matrix.python-version }} ${{ matrix.nox-session}}
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout Repository
@@ -75,6 +81,7 @@ jobs:
run: ./ci/run_tests.sh
env:
PYTHON_VERSION: ${{ matrix.python-version }}
+ NOX_SESSION: ${{ matrix.nox-session }}
- name: Upload Coverage
run: ./ci/upload_coverage.sh

MODIFY
.travis.yml
.travis.yml
@@ -29,27 +29,6 @@ env:
# PYPI_PASSWORD is set in Travis control panel.
jobs:
- allow_failures:
- - python: nightly
- include:
- # Unit tests
- - python: 3.6
- env: NOX_SESSION=test-3.6
- - python: 3.7
- env: NOX_SESSION=test-3.7
- - python: 3.8
- env: NOX_SESSION=test-3.8
- - python: 3.9
- env: NOX_SESSION=test-3.9
- - python: nightly
- env: NOX_SESSION=test-3.10
- - python: pypy3.6-7.3.1
- env: NOX_SESSION=test-pypy
-
- # Extras
- - python: 3.7
- env: NOX_SESSION=google_brotli
-
# Downstream integration tests.
- python: 3.7
env: DOWNSTREAM=requests

MODIFY
ci/run_tests.sh
ci/run_tests.sh
#!/bin/bash
+if [[ -z "$NOX_SESSION" ]]; then
NOX_SESSION=test-${PYTHON_VERSION%-dev}
+fi
nox -s $NOX_SESSION --error-on-missing-interpreters

Switch Linux PR tests to GitHub Actions

Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>