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 from Travis to GH actions #162

Merged
merged 5 commits into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
68 changes: 68 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]


jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: "2.7"
env:
TOXENV: "msgpack"
- python-version: "2.7"
env:
TOXENV: "json"
- python-version: "pypy3"
env:
TOXENV: "msgpack"
- python-version: "pypy3"
env:
TOXENV: "json"

- python-version: "3.6"
env:
TOXENV: "msgpack"
- python-version: "3.6"
env:
TOXENV: "json"
- python-version: "3.7"
env:
TOXENV: "msgpack"
- python-version: "3.7"
env:
TOXENV: "json"
- python-version: "3.8"
env:
TOXENV: "msgpack"
- python-version: "3.8"
env:
TOXENV: "json"
- python-version: "3.9"
env:
TOXENV: "msgpack"
- python-version: "3.9"
env:
TOXENV: "json"

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

- name: Upload to codecov
uses: codecov/codecov-action@v2
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish
on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Build distribution
run: |
pip install -U setuptools wheel
python setup.py sdist bdist_wheel

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
15 changes: 0 additions & 15 deletions .travis-workarounds.sh

This file was deleted.

43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# and then run "tox" from this directory.

[tox]
envlist = py{27,py,35,36,37}-{json,msgpack}
envlist = py{36,py3,37,38,39}-{json,msgpack}

[testenv]
deps =
-r{toxinidir}/requirements-base.txt
-r{toxinidir}/requirements-test.txt
msgpack: -r{toxinidir}/requirements.txt
pypy-msgpack: -r{toxinidir}/requirements-pypy.txt
commands = py.test --cov=scrapinghub --cov-report=
commands = py.test --cov=scrapinghub --cov-report=xml