-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (36 loc) · 1.1 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
name: CI
on: [push, pull_request]
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
python -m pip install poetry==1.3.2
- name: Set Poetry config
run: |
python -m poetry config virtualenvs.in-project true
- name: Cache Poetry virtualenv
uses: actions/cache@v3
id: cache
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Test with pytest
run: python -m poetry run pytest --cov -n 2 --cov-report xml --cov-report term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
env_vars: PYTHON