Skip to content

Commit dd0039f

Browse files
authored
Configure GitHub Actions for CI (#463)
* Use Codecov action to upload coverage * Remove Travis build * Remove codecov as dependency now that we use its GH action * Update README badge * Remove Travis/Codecov related lines from tox.ini
1 parent f9a40f5 commit dd0039f

File tree

5 files changed

+57
-21
lines changed

5 files changed

+57
-21
lines changed

.github/workflows/push.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
test:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
max-parallel: 4
13+
matrix:
14+
python-version: [ 2.7, 3.6 ]
15+
os: [ ubuntu-latest ]
16+
env:
17+
OS: ${{ matrix.os }}
18+
PYTHON_VERSION: ${{ matrix.python-version }}
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v1
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install pip
29+
run: pip install --upgrade pip
30+
31+
- name: Install development dependencies (Python 2)
32+
if: ${{ startsWith(matrix.python-version, '2.') }}
33+
run: pip install --upgrade -r dev-requirements-py2.txt
34+
35+
- name: Install development dependencies (Python 3)
36+
if: ${{ startsWith(matrix.python-version, '3.') }}
37+
run: pip install --upgrade -r dev-requirements-py3.txt
38+
39+
- name: Install package
40+
run: pip install -e .
41+
42+
- name: Run tests
43+
run: pytest tests --cov=./
44+
45+
- name: Run lint
46+
run: prospector --profile ./prospector.yaml -t dodgy -t mccabe -t profile-validator -t pyflakes -t pylint
47+
48+
- name: Run rstcheck
49+
run: rstcheck README.rst
50+
51+
- name: Upload coverage to Codecov
52+
uses: codecov/codecov-action@v2
53+
with:
54+
env_vars: OS,PYTHON_VERSION

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
databricks-cli
22
==============
3-
.. image:: https://travis-ci.org/databricks/databricks-cli.svg?branch=master
4-
:target: https://travis-ci.org/databricks/databricks-cli
5-
:alt: Build Status
3+
.. image:: https://github.com/databricks/databricks-cli/actions/workflows/push.yml/badge.svg?branch=master
4+
:target: https://github.com/databricks/databricks-cli/actions/workflows/push.yml?query=branch%3Amaster
5+
:alt: Build status
66
.. image:: https://codecov.io/gh/databricks/databricks-cli/branch/master/graph/badge.svg
77
:target: https://codecov.io/gh/databricks/databricks-cli
88

dev-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ mock
44
decorator
55
requests_mock
66
rstcheck
7-
codecov

tox.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
envlist = py27, py36
33

44
[testenv]
5-
# https://github.com/codecov/codecov-python/blob/5b9d539a6a09bc84501b381b563956295478651a/README.md#using-tox
6-
passenv = TOXENV CI TRAVIS TRAVIS_*
75
deps =
86
py27: -rdev-requirements-py2.txt
97
py36: -rdev-requirements-py3.txt
108
commands =
119
pytest tests --cov=./
1210
py36: ./lint.sh
1311
py27: ./lint.sh 2
14-
codecov -e TOXENV

0 commit comments

Comments
 (0)