-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (46 loc) · 1.29 KB
/
unittest.yaml
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
name: Test
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Pytest
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.7", "3.8", "3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: "x64"
- name: Install system dependencies
run: sudo apt install -y libkrb5-dev
- name: Cache venv
uses: actions/cache@v2
with:
path: venv
# Look to see if there is a cache hit for the corresponding requirements file
key: poetryenv-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('poetry.lock') }}
- name: Install Dependencies
run: |
python3 -m venv venv
. venv/bin/activate
pip install -U pip setuptools poetry
poetry install
python -c "import sys; print(sys.version)"
pip list
- name: Pytest
run: |
. venv/bin/activate
pytest --cov --cov-report=term --cov-report=xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella