Skip to content

Commit 528cb11

Browse files
committed
Create main.yml
1 parent c930b37 commit 528cb11

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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:
7+
push:
8+
branches:
9+
- main
10+
- 'feat/**'
11+
pull_request:
12+
branches: [ main ]
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
pip install --upgrade pip
32+
pip install setuptools==57.5.0
33+
pip install flake8 pytest
34+
pip install .
35+
36+
- name: Lint with flake8
37+
run: |
38+
# stop the build if there are Python syntax errors or undefined names
39+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
40+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
41+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
42+
- name: Test with pytest
43+
run: |
44+
pytest

0 commit comments

Comments
 (0)