-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.11 KB
/
continuous-integration.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: guillotina_audit
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
database: ["DUMMY", "postgres"]
env:
DATABASE: ${{ matrix.database }}
steps:
# Checkout the repository first
- uses: actions/checkout@v2
# Setup the python version
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
# Linters and typing
- name: Pre-checks
run: |
# Install
pip install flake8 isort black==22.10.0
# Run commands
flake8 guillotina_audit --config=setup.cfg
isort -c -rc guillotina_audit
black --check --verbose guillotina_audit
# Run tests
- name: Run tests
run: |
# Install package with test dependecies
pip install -e .[test]
# Run tests
pytest --capture=no --tb=native -v guillotina_audit --cov=guillotina_audit --cov-report term-missing --cov-append guillotina_audit