-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.69 KB
/
python-package.yaml
File metadata and controls
49 lines (49 loc) · 1.69 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
39
40
41
42
43
44
45
46
47
48
49
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
code-quality: write
jobs:
lint-and-test-with-cov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
ref: ${{github.event.pull_request.head.sha || github.sha}}
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
enable-cache: true
python-version: 3.15.0-beta.1
cache-python: true
activate-environment: true
- run: uvx ruff check --output-format=github && uvx ty check --output-format=github
- run: uv run --with ".[test]" pytest -vv -p asyncio -p pytest_cov -p no:asyncio-cooperative --no-local-badge --maxfail 0 --tb long --cov asyncutils --cov-report xml
- if: ${{github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository}}
uses: actions/upload-code-coverage@v1.2.0
with:
file: coverage.xml
language: Python
label: code-coverage/pytest
test:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12", "3.15.0-beta.1"]
exclude:
- os: ubuntu-latest
python-version: "3.15.0-beta.1"
steps:
- uses: actions/checkout@v6.0.2
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
enable-cache: true
python-version: ${{matrix.python-version}}
cache-python: true
- run: uv run --with ".[test]" pytest -vv -p asyncio -p no:pytest_cov -p no:asyncio-cooperative --no-local-badge --maxfail 0 --tb long