-
Notifications
You must be signed in to change notification settings - Fork 141
109 lines (104 loc) · 3.22 KB
/
test-downstream.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
name: Test against downstream projects
on:
workflow_dispatch:
jobs:
starlette:
name: "Starlette on Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10", "3.12"]
steps:
- uses: actions/checkout@v4
with:
repository: encode/starlette
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
scripts/install
pip install anyio[trio]@git+https://github.com/agronholm/anyio.git@${{ github.ref_name }}
- name: Run tests
run: scripts/test
- name: Enforce coverage
run: scripts/coverage
httpcore:
name: "Httpcore on Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10", "3.12"]
steps:
- uses: actions/checkout@v4
with:
repository: encode/httpcore
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
scripts/install
pip install anyio[trio]@git+https://github.com/agronholm/anyio.git@${{ github.ref_name }}
- name: Run tests
run: scripts/test
- name: Enforce coverage
run: scripts/coverage
fastapi:
name: "FastAPI on Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.11"]
steps:
- uses: actions/checkout@v4
with:
repository: tiangolo/fastapi
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
cache: pip
cache-dependency-path: |
requirements-tests.txt
pyproject.toml
- name: Install dependencies
run: |
pip install -r requirements-tests.txt
pip install anyio[trio]@git+https://github.com/agronholm/anyio.git@${{ github.ref_name }}
- name: Run tests
run: bash scripts/test.sh
litestar:
name: "Litestar on Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10", "3.12"]
steps:
- uses: actions/checkout@v4
with:
repository: litestar-org/litestar
- uses: pdm-project/setup-pdm@v3
name: Set up PDM
with:
python-version: ${{ matrix.python-version }}
allow-python-prereleases: false
cache: true
cache-dependency-path: pdm.lock
- name: Install dependencies
run: |
pdm install -G:all
pdm add --no-lock --update-reuse-installed anyio[trio]@git+https://github.com/agronholm/anyio.git@${{ github.ref_name }}
- name: Test
run: pdm run pytest docs/examples tests -n auto