Skip to content

Commit 3980c17

Browse files
committed
Added GitHub action
To be used instead of Travis
1 parent a9ac10c commit 3980c17

File tree

3 files changed

+47
-27
lines changed

3 files changed

+47
-27
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI Build
5+
6+
on:
7+
push:
8+
branches: '**'
9+
tags: '**'
10+
pull_request:
11+
branches: '**'
12+
13+
jobs:
14+
build:
15+
timeout-minutes: 10
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install flake8 pytest
32+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33+
- name: Lint with flake8
34+
run: |
35+
# stop the build if there are Python syntax errors or undefined names
36+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+
- name: Test
40+
run: |
41+
./run_tests.sh
42+
- name: Coveralls
43+
env:
44+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
45+
run: |
46+
pip install coveralls
47+
coveralls

.travis.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)