-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (33 loc) · 853 Bytes
/
tests.yaml
File metadata and controls
35 lines (33 loc) · 853 Bytes
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
---
name: tests
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Trunk Check
uses: trunk-io/trunk-action@v1
tests:
runs-on: ubuntu-latest
strategy:
matrix:
test: [unit, api]
steps:
- uses: actions/checkout@v4
- name: install poetry
run: pip install poetry
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: poetry
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest tests/${{ matrix.test }} --cov=. --cov-report=xml
- name: Upload test coverage
uses: codecov/codecov-action@v5
with:
flags: ${{ matrix.test }}
token: ${{ secrets.CODECOV_TOKEN }}
if: always()