-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (36 loc) · 1.01 KB
/
tests.yaml
File metadata and controls
38 lines (36 loc) · 1.01 KB
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
name: tests
on:
pull_request:
branches:
- "main*"
workflow_call:
jobs:
tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install uv and sync dev dependencies
run: |
pip install uv
uv venv
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH
uv sync --dev
- name: Run tests with pytest and collect coverage
run:
pytest --cov=pdfbaker --cov-report=xml --junitxml=junit.xml -o
junit_family=legacy
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}