-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (30 loc) · 867 Bytes
/
python-app.yml
File metadata and controls
39 lines (30 loc) · 867 Bytes
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
name: Python application
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Cache Venv
id: cache-venv
uses: actions/cache@v2.1.4
with:
path: ./venv
key: PY-VERSION-${{ env.pythonLocation }}-SETUP-${{ hashFiles('setup.py') }}
- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m venv ./venv
source ./venv/bin/activate
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Linting with flake8
run: |
source ./venv/bin/activate
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics