-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.52 KB
/
python-app.yml
File metadata and controls
49 lines (46 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build
on:
push:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup acceptable python version
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Flake8 Lint
run: |
flake8 autodoc_ext --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 autodoc_ext --count --exit-zero --max-complexity=10 --max-line-length=80 --statistics
tests:
runs-on: ${{ matrix.os }}
name: ${{matrix.os}}-${{matrix.python-version}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.6", "3.9"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Local install
run: |
python -m pip install . --upgrade
- name: Install Test Deps
run: |
python -m pip install pytest pytest-cov coverage
- name: Tests
run: |
pytest --cov=tests