Skip to content

Commit

Permalink
feat: ci: replace travis by github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Marlon Rodriguez committed Mar 21, 2022
1 parent 40ab739 commit aa39704
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 27 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']

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 tox tox-gh-actions coveralls
pip install -r requirements-test.txt
- name: Test with tox
run: |
tox
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true

coveralls:
name: Indicate completion to coveralls.io
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tox
flake8
flake8-copyright
isort
Expand Down
19 changes: 12 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
[tox]
envlist = flake8,isort,py27,py34,py35,py36,py37
envlist = py36,py37,py38,py39,py310,flake8,isort

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310, flake8, isort


[testenv]
passenv = TRAVIS TRAVIS_*
passenv = GITHUB_*
deps =
coverage
delegator.py
Expand All @@ -25,8 +34,4 @@ deps =
isort
delegator.py
commands =
isort --check-only --recursive --diff num2words tests

[testenv:py27]
setenv =
PYTHONIOENCODING = UTF-8
isort --check-only --float-to-top --diff num2words tests

0 comments on commit aa39704

Please sign in to comment.