-
Notifications
You must be signed in to change notification settings - Fork 1k
48 lines (46 loc) · 1.27 KB
/
test.yaml
File metadata and controls
48 lines (46 loc) · 1.27 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
name: test
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- run: uvx hatch test -acp
if: ${{ always() }}
test-legacy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9']
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Run tests on Python ${{ matrix.python-version }}
run: uv run --python ${{ matrix.python-version }} --with pytest --with pytest-anyio --with pytest-httpserver pytest tests/
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: check formatting
run: uvx hatch fmt --check -f
- name: check linting
run: uvx hatch fmt --check -l --output-format=github
- name: check uv.lock is up-to-date
run: uv lock --check
- name: check requirements.txt is up-to-date
run: |
uv export >requirements.txt
git diff --exit-code requirements.txt