-
Notifications
You must be signed in to change notification settings - Fork 40
43 lines (39 loc) · 1.17 KB
/
python.yml
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
name: Python CI Check
on:
push:
branches: [ master, develop ]
paths: ['saas/**']
pull_request:
branches: [ master, develop ]
paths: ['saas/**']
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: [3.6]
poetry-version: [1.1.7]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'saas/requirements_dev.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r saas/requirements_dev.txt
- name: Lint with flake8
run: pflake8 --config=saas/pyproject.toml saas
- name: Lint with bandit
run: bandit -c saas/pyproject.toml -r saas
- name: Lint with mypy
run: mypy --config-file=saas/pyproject.toml saas
- name: Import Linter
run: cd saas && lint-imports --config=./.importlinter && cd ..
- name: Test with pytest
run: pytest -c saas/pyproject.toml saas