diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml new file mode 100644 index 000000000..2d2e53ec5 --- /dev/null +++ b/.github/workflows/pipeline.yaml @@ -0,0 +1,29 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [3.5, 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: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e . + - name: Lint with pycodestyle + run: | + pycodestyle tableauserverclient test samples + - name: Test with pytest + run: | + pytest test \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 41316d700..000000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -dist: xenial -language: python -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" -# command to install dependencies -install: - - "pip install -e ." - - "pip install pycodestyle" -# command to run tests -script: - # Tests - - python setup.py test - - pycodestyle tableauserverclient test samples diff --git a/setup.py b/setup.py index 5586e4716..63531fe6b 100644 --- a/setup.py +++ b/setup.py @@ -34,9 +34,12 @@ install_requires=[ 'requests>=2.11,<3.0', ], - tests_require=[ - 'requests-mock>=1.0,<2.0', - 'pytest', - 'mock' - ] + extras_require={ + 'test': [ + 'requests-mock>=1.0,<2.0', + 'pytest', + 'mock', + 'pycodestyle' + ] + } ) diff --git a/test/test_dataalert.py b/test/test_dataalert.py index 7822d3000..f480a58ec 100644 --- a/test/test_dataalert.py +++ b/test/test_dataalert.py @@ -46,7 +46,7 @@ def test_get(self): self.assertEqual('6d13b0ca-043d-4d42-8c9d-3f3313ea3a00', all_alerts[0].workbook_id) self.assertEqual('Safari stats', all_alerts[0].workbook_name) self.assertEqual('5241e88d-d384-4fd7-9c2f-648b5247efc5', all_alerts[0].project_id) - self.assertEqual('Default', all_alerts[0].project_name) + self.assertEqual('Defaultt', all_alerts[0].project_name) def test_get_by_id(self): response_xml = read_xml_asset(GET_BY_ID_XML)