Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate CI to GitHub actions (#4924)
- Loading branch information
Showing
10 changed files
with
211 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Checks | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
include: | ||
- python-version: 3.8 | ||
env: | ||
TOXENV: security | ||
- python-version: 3.8 | ||
env: | ||
TOXENV: flake8 | ||
- python-version: 3.8 | ||
env: | ||
TOXENV: pylint | ||
- python-version: 3.8 | ||
env: | ||
TOXENV: typing | ||
- python-version: 3.7 # Keep in sync with .readthedocs.yml | ||
env: | ||
TOXENV: docs | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run check | ||
env: ${{ matrix.env }} | ||
run: | | ||
pip install -U tox | ||
tox |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish | ||
on: [push] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-18.04 | ||
if: startsWith(github.event.ref, 'refs/tags/') | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Check Tag | ||
id: check-release-tag | ||
run: | | ||
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+[.][0-9]+[.][0-9]+(rc[0-9]+|[.]dev[0-9]+)?$ ]]; then | ||
echo ::set-output name=release_tag::true | ||
fi | ||
- name: Publish to PyPI | ||
if: steps.check-release-tag.outputs.release_tag == 'true' | ||
run: | | ||
pip install --upgrade setuptools wheel twine | ||
python setup.py sdist bdist_wheel | ||
export TWINE_USERNAME=__token__ | ||
export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: macOS | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: macos-10.15 | ||
strategy: | ||
matrix: | ||
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: Run tests | ||
run: | | ||
pip install -U tox | ||
tox -e py | ||
- name: Upload coverage report | ||
run: bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Ubuntu | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
include: | ||
- python-version: 3.7 | ||
env: | ||
TOXENV: py | ||
- python-version: 3.8 | ||
env: | ||
TOXENV: py | ||
- python-version: pypy3 | ||
env: | ||
TOXENV: pypy3 | ||
PYPY_VERSION: 3.6-v7.3.1 | ||
|
||
# pinned deps | ||
- python-version: 3.6.12 | ||
env: | ||
TOXENV: pinned | ||
- python-version: 3.6.12 | ||
env: | ||
TOXENV: asyncio-pinned | ||
- python-version: pypy3 | ||
env: | ||
TOXENV: pypy3-pinned | ||
PYPY_VERSION: 3.6-v7.2.0 | ||
|
||
# extras | ||
- python-version: 3.8 | ||
env: | ||
TOXENV: extra-deps | ||
- python-version: 3.8 | ||
env: | ||
TOXENV: asyncio | ||
|
||
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 system libraries | ||
if: matrix.python-version == 'pypy3' || contains(matrix.env.TOXENV, 'pinned') | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libxml2-dev libxslt-dev | ||
- name: Run tests | ||
env: ${{ matrix.env }} | ||
run: | | ||
if [[ ! -z "$PYPY_VERSION" ]]; then | ||
export PYPY_VERSION="pypy$PYPY_VERSION-linux64" | ||
wget "https://downloads.python.org/pypy/${PYPY_VERSION}.tar.bz2" | ||
tar -jxf ${PYPY_VERSION}.tar.bz2 | ||
$PYPY_VERSION/bin/pypy3 -m venv "$HOME/virtualenvs/$PYPY_VERSION" | ||
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate" | ||
fi | ||
pip install -U tox | ||
tox | ||
- name: Upload coverage report | ||
run: bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Windows | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- python-version: 3.6 | ||
env: | ||
TOXENV: windows-pinned | ||
- python-version: 3.7 | ||
env: | ||
TOXENV: py | ||
- python-version: 3.8 | ||
env: | ||
TOXENV: py | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run tests | ||
env: ${{ matrix.env }} | ||
run: | | ||
pip install -U tox | ||
tox |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.