Skip to content

Commit 04e8689

Browse files
authored
Merge pull request #41 from mitre/t40-github-ci
Basic github actions CI workflow, closes #40
2 parents 6c0c7b4 + db85de6 commit 04e8689

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/python-package.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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: Python package
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: [3.7, 3.8, 3.9]
17+
exclude:
18+
- os: macos-latest
19+
python-version: [3.7]
20+
- os: windows-latest
21+
python-version: [3.7]
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
python3 -m pip install --upgrade pip
32+
python3 -m pip install flake8
33+
python3 -m pip install -r requirements.txt
34+
- name: Lint with flake8
35+
run: |
36+
# Note: ignore .py versions of notebooks; too many formatting issues
37+
# stop the build if there are Python syntax errors or undefined names
38+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=GrowthViz-*.py
39+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
40+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=GrowthViz-*.py
41+
- name: Test with unittest
42+
run: |
43+
python3 -m unittest

0 commit comments

Comments
 (0)