-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.17 KB
/
herding_cats_explorer_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
name: HerdingCats Unit Tests
on:
push:
branches:
- main
paths:
- "tests/**"
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
poetry config virtualenvs.create false
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest-cov
poetry install --no-interaction
- name: Create pytest.ini
run: |
echo "[pytest]" > pytest.ini
echo "pythonpath = ." >> pytest.ini
- name: Run tests with coverage
run: |
pytest tests/ --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}