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

Replace CI on Travis and AppVeyor with GitHub Actions #1472

Merged
merged 9 commits into from
May 15, 2020
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U tox tox-gh-actions
- name: Run tests
run: tox
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
file: ./cov.xml

check:
runs-on: ubuntu-latest
strategy:
matrix:
component: [docker, docs, lint]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U tox
- name: Run checks
run: tox -e ${{ matrix.component }}
26 changes: 26 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist
twine upload dist/*
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

19 changes: 0 additions & 19 deletions appveyor.yml

This file was deleted.

8 changes: 7 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
[tox]
envlist = py36, py37, lint, docker
envlist = py36, py37, py38, lint, docker
skip_missing_interpreters = True

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38

[testenv]
setenv =
LANG=en_US.UTF-8
Expand Down