Skip to content

Commit d70af58

Browse files
Create python-package.yml
Let's try out this CI thing...
1 parent c852e10 commit d70af58

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
# This version is customized to use the local flake8rc and test with unpythonic.setup.fixtures.
5+
6+
name: Python package
7+
8+
on:
9+
push:
10+
branches: [ master ]
11+
pull_request:
12+
branches: [ master ]
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python-version: [3.4, 3.5, 3.6, 3.7]
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+
pip install flake8
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 . --config=flake8rc --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+
- name: Test with unpythonic.setup.fixtures
40+
run: |
41+
python runtests.py

0 commit comments

Comments
 (0)