generated from njzjz/python-template
-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (35 loc) · 910 Bytes
/
test.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
name: Test Python package
on:
push:
branches:
- master
pull_request:
env:
UV_SYSTEM_PYTHON: 1
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: |
**/requirements*.txt
**/pyproject.toml
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: uv pip install nox[uv]
- name: Test with pytest
run: nox -db uv
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}