-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (52 loc) · 1.49 KB
/
ci.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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Python package
on:
push:
branches:
- 'master'
- 'devel'
paths:
- catflow/**
- tests/**
- .github/workflows/ci.yml
- pyproject.toml
- poetry.lock
pull_request:
paths:
- catflow/**
- tests/**
- .github/workflows/ci.yml
- pyproject.toml
- poetry.lock
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
poetry-version: ["1.6.1"]
steps:
- uses: actions/checkout@v2
- name: Install OS dependencies
run: |
sudo apt-get update -yy
sudo apt-get install -yy \
msttcorefonts
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install --no-interaction --without docs
- name: Lint with flake8
run: |
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run coverage run --source=./catflow -m pytest -v tests/
poetry run coverage report