-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.25 KB
/
tests.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
name: CI
on: [push, pull_request]
jobs:
build:
name: Run Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
py: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.py }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.py }}
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Dependencies
run: |
pip install pytest pytest-cov
- name: Install calabar
run: |
pip install .
- name: Run Unit Tests
run: |
pytest -vvv --color=yes --cov=calabar --cov-append tests/unit
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true