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

Switch pipeline to Github Actions #866

Merged
merged 5 commits into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from 4 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
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Run tests and linting
davfsa marked this conversation as resolved.
Show resolved Hide resolved

on:
push:
pull_request:

permissions:
contents: read

jobs:
tests:
name: Run tests
davfsa marked this conversation as resolved.
Show resolved Hide resolved

strategy:
fail-fast: false
matrix:
# Python 3.4 disabled, due to problems with GitHub Actions.
python-version: [3.10-dev, 3.9, 3.8, 3.7, 3.6, 3.5, 2.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test-requirements.txt

- name: Run tests
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
export PYTHONPATH=`python -c "import sys; print('python2' if sys.version.startswith('2') else 'src')"`
if [[ $PYTHON_VERSION < '3.7' ]]; then pytest $PYTHONPATH; fi

if [[ $PYTHON_VERSION < '3.5' ]]; then pip install -U .; fi
export PYTHONPATH=`python -c "import sys; print('typing_extensions/src_py2' if sys.version.startswith('2') else 'typing_extensions/src_py3')"`
pytest $PYTHONPATH

linting:
name: Run linting

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test-requirements.txt

- name: Run linting
run: |
flake8
flake8 --config=.flake8-tests src/test_typing.py python2/test_typing.py typing_extensions/src_py2/test_typing_extensions.py typing_extensions/src_py3/test_typing_extensions.py
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
flake8; python_version >= '3.6'
flake8-bugbear; python_version >= '3.6'
flake8-pyi; python_version >= '3.6'
pytest>=4.4.1; python_version >= '3.4'
pytest==4.6.11
davfsa marked this conversation as resolved.
Show resolved Hide resolved
pytest-xdist>=1.18; python_version >= '3.4'
pytest-cov>=2.4.0; python_version >= '3.4'