Skip to content

Commit

Permalink
feat: move CI from travis to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rgonalo committed Mar 7, 2021
1 parent a98bede commit 41e2357
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 52 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: build

on: [push, pull_request]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
fail-fast: false

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
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest and coverage
run: |
coverage run --source=toolium -m pytest toolium/test
- name: Publish on coveralls.io
if: ${{ matrix.python-version != '2.7' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: Python ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
coveralls --service=github
coveralls:
needs: test
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade coveralls
- name: Finalize publishing on coveralls.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --finish
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Toolium is a Python wrapper tool of Selenium and Appium libraries to test web an
project. It provides a way of choosing and configuring the driver through a configuration file, implements a Page Object
pattern and includes a simple visual testing solution.

.. |Build Status| image:: https://travis-ci.org/Telefonica/toolium.svg?branch=master
:target: https://travis-ci.org/Telefonica/toolium
.. |Build Status| image:: https://github.com/Telefonica/toolium/workflows/build/badge.svg
:target: https://github.com/Telefonica/toolium/actions
.. |Documentation Status| image:: https://readthedocs.org/projects/toolium/badge/?version=latest
:target: http://toolium.readthedocs.org/en/latest
.. |Coverage Status| image:: https://coveralls.io/repos/Telefonica/toolium/badge.svg?branch=master&service=github
Expand Down
21 changes: 11 additions & 10 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Sphinx==1.5.1
behave==1.2.5
Sphinx==3.*
lettuce==0.2.23
pytest==2.9.2 ; python_version < '3.9'
pytest==6.1.2 ; python_version >= '3.9'
coverage==4.3.1
mock==2.0.0
requests-mock==1.2.0
coveralls==1.1
#pytest==4.6.6 ; python_version < '3.9'
#pytest==6.2.2 ; python_version >= '3.9'
pytest==6.*
coverage==5.*
coveralls==3.* ; python_version >= '3.5'
mock==4.*
requests-mock==1.*
needle==0.5.0
docutils==0.14
Pygments==2.2.0
docutils==0.*
Pygments==2.*
flake8==3.*
11 changes: 0 additions & 11 deletions tox.ini

This file was deleted.

0 comments on commit 41e2357

Please sign in to comment.