-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (35 loc) · 1.03 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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
COV_MIN: 70
strategy:
matrix:
py_version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python ${{ matrix.py_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version }}
- name: Install poetry
uses: snok/[email protected]
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Test with pytest
working-directory: tests
run: poetry run pytest --cov=pywrparser --cov-fail-under=$COV_MIN