Skip to content

Commit

Permalink
Farewell Travis CI! (#514)
Browse files Browse the repository at this point in the history
* Add GH workflow

* Remove Travis CI

* Use supported envs only

* Fix 3.9 pylint

* Fix coveralls

* Cache pre-commit and add changelog

* Run on all branches and on each and every pull request

* Coveralls :)
  • Loading branch information
marvin-w authored Nov 28, 2020
1 parent f1f654f commit 4a3718d
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 24 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[run]
source = xknx
relative_files = True

omit =

Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
push:
branches:
- '**' # run on all branches
pull_request:
branches:
- '**' # run on all branches

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v2
env:
cache-name: cache-pypi-modules
with:
# pip cache files are stored in `~/.cache/pip` on Linux
path: ~/.cache/pip
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('requirements/production.txt', 'requirements/testing.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Cache pre-commit packages
uses: actions/cache@v2
env:
cache-name: cache-pre-commit
with:
# pre-commit cache files are usually stored in `~/.cache/pre-commit` on Linux
path: ~/.cache/pre-commit
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install dependencies
run: |
pip install -r requirements/testing.txt
- name: CI
run: |
tox
- name: Coveralls
uses: johanneswilm/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test

coveralls_finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: johanneswilm/coveralls-python-action@develop
with:
parallel-finished: true
4 changes: 3 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ extension-pkg-whitelist=netifaces
# inconsistent-return-statements - doesn't handle raise
# too-many-ancestors - it's too strict.
# wrong-import-order - isort guards this
# unsubscriptable-object - https://github.com/PyCQA/pylint/issues/3882
# fixme - TODO
disable=
format,
Expand All @@ -43,7 +44,8 @@ disable=
too-many-statements,
too-many-boolean-expressions,
unused-argument,
wrong-import-order
wrong-import-order,
unsubscriptable-object
# enable useless-suppression temporarily every now and then to clean them up
enable=
use-symbolic-message-instead
Expand Down
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Internals

- Telegram: `group_address` renamed to `destination_address`, to prepare support for other APCI services.
- Farewell Travis CI; Welcome Github Actions!

## 0.15.6 Bugfix for StateUpater 2020-11-26

Expand Down

0 comments on commit 4a3718d

Please sign in to comment.