8000 Removes travis and adds linting/testing into github action (#798) · atlanhq/server-client-python@6c7a87b · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 6c7a87b

Browse files
author
Chris Shin
authored
Removes travis and adds linting/testing into github action (tableau#798)
* Removes travis and adds github workflow * Addressing code review feedback
1 parent 9179637 commit 6c7a87b

File tree

3 files changed

+38
-22
lines changed

3 files changed

+38
-22
lines changed

.github/workflows/run-tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Python package
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -e .[test]
26+
27+
- name: Lint with pycodestyle
28+
run: |
29+
pycodestyle tableauserverclient test samples
30+
31+
- name: Test with pytest
32+
run: |
33+
pytest test

.travis.yml

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

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# This makes work easier for offline installs or low bandwidth machines
1616
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
1717
pytest_runner = ['pytest-runner'] if needs_pytest else []
18+
test_requirements = ['mock', 'pycodestyle', 'pytest', 'requests-mock>=1.0,<2.0']
1819

1920
setup(
2021
name='tableauserverclient',
@@ -34,9 +35,8 @@
3435
install_requires=[
3536
'requests>=2.11,<3.0',
3637
],
37-
tests_require=[
38-
'requests-mock>=1.0,<2.0',
39-
'pytest',
40-
'mock'
41-
]
38+
tests_require=test_requirements,
39+
extras_require={
40+
'test': test_requirements
41+
}
4242
)

0 commit comments

Comments
 (0)
0