Skip to content

Commit

Permalink
chore: Move build from Travis to GitHub actions (#669)
Browse files Browse the repository at this point in the history
Closes: SDK-1872
  • Loading branch information
lukaszsocha2 committed Feb 2, 2022
1 parent 2595720 commit 2db93b5
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 128 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build
on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.6', '3.7', 'pypy-3.6-v7.3.3' ]
name: Build with Python ${{ matrix.python-version }}
steps:
- name: Checkout
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 -r requirements-dev.txt
- name: Test with tox
run: tox
coverage:
name: Coverage report
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
- name: Send coverage report to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tox -e coverage
coveralls --service=github
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .travis/install.sh

This file was deleted.

20 changes: 0 additions & 20 deletions .travis/run.sh

This file was deleted.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Box Python SDK
.. image:: http://opensource.box.com/badges/active.svg
:target: http://opensource.box.com/badges

.. image:: https://travis-ci.org/box/box-python-sdk.png?branch=main
:target: https://travis-ci.org/box/box-python-sdk

.. image:: https://readthedocs.org/projects/box-python-sdk/badge/?version=latest
:target: http://box-python-sdk.readthedocs.org/en/latest
:alt: Documentation Status

.. image:: https://github.com/box/box-python-sdk/workflows/build/badge.svg
:target: https://github.com/box/box-python-sdk/actions

.. image:: https://img.shields.io/pypi/v/boxsdk.svg
:target: https://pypi.python.org/pypi/boxsdk

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ def main():
'pytest>=2.8.3, <4.0.0',
'pytest-cov',
'pytest-xdist<1.28.0',
'python-coveralls',
'coverage<5.0', # 2020-01-14: backwards-compatibility issue with coverage 5.0 impacting python-coveralls
'coveralls',
'coverage',
'tox-gh-actions',
'pytz',
]
extra_requires['test'] = test_requires
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ envlist =
docs,
coverage

[gh-actions]
python =
3.6: py36, pycodestyle, pylint, rst, docs
3.7: py37
pypy-3.6: pypy

[testenv]
commands =
pytest {posargs} --disable-pytest-warnings
Expand Down Expand Up @@ -46,13 +52,8 @@ deps = -rrequirements-dev.txt
basepython = python3.6
commands =
py.test --cov boxsdk --cov-report term-missing test/unit test/integration
coveralls
deps =
-rrequirements-dev.txt
passenv =
TRAVIS
TRAVIS_BRANCH
TRAVIS_JOB_ID

[testenv:docs]
allowlist_externals = make
Expand Down

0 comments on commit 2db93b5

Please sign in to comment.