generated from dycw/template-python
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.53 KB
/
pull-request.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
name: pull-request
on:
pull_request:
branches:
- master
jobs:
test-windows-and-mac:
name: test / ${{ matrix.os }} / ${{ matrix.version }}
env:
CI: 1
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
- run: git fetch origin master:origin/master --update-head-ok # https://stackoverflow.com/a/76384065
- run: python -m pip install uv
- run: uv pip sync --system --compile requirements.txt
- run: pytest --cov-report=term-missing:skip-covered -n=auto
timeout-minutes: 60
test-ubuntu:
name: test / ubuntu-latest / ${{ matrix.version }}
env:
CI: 1
runs-on: ubuntu-latest
services:
redis:
image: redis/redis-stack:latest
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
- run: git fetch origin master:origin/master --update-head-ok
- run: python -m pip install uv
- run: uv pip sync --system --compile requirements.txt
- run: pytest --cov-report=term-missing:skip-covered -n=auto
timeout-minutes: 60