-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (29 loc) · 990 Bytes
/
python-package.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
name: Python package
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
MIN_CODE_COVERAGE_PERCENT: 82
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.7.1
- name: Define a cache for the virtual environment based on the dependencies lock file
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install project dependencies
run: poetry install --without lint
- name: Run automated tests (with code coverage)
run: poetry run pytest -v --cov=pydoctrace --cov-branch --cov-report term-missing --cov-fail-under $MIN_CODE_COVERAGE_PERCENT