-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (75 loc) · 2.25 KB
/
Copy pathtest.yml
File metadata and controls
87 lines (75 loc) · 2.25 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
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
name: test
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
pytest-modern:
name: pytest (Python ${{ matrix.python-version }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.10"
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Sync dependencies
run: uv sync --dev
- name: Run pytest
run: uv run pytest
pytest-py36:
name: pytest (Python 3.6)
runs-on: ubuntu-22.04
container:
image: python:3.6.15-slim-bullseye
steps:
- name: Install system dependencies
run: |
printf '%s\n' \
'deb [check-valid-until=no] https://archive.debian.org/debian bullseye main' \
> /etc/apt/sources.list
apt-get -o APT::Update::Error-Mode=any update
apt-get install -y --no-install-recommends git nodejs npm
- name: Check out repository
uses: actions/checkout@v4
- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$PWD"
- name: Show runtime versions
run: |
python --version
pip --version
git --version
node --version
- name: Install Python 3.6 compatibility dependencies
run: |
python -m pip install -i https://pypi.org/simple \
"dataclasses>=0.8" \
"typing_extensions>=4.1.1,<4.2" \
"importlib_metadata>=4.8.3,<5" \
"tomli>=1.2.3,<2" \
"requests>=2.27.1" \
"prompt-toolkit>=3.0.36,<3.1" \
"pyyaml>=6.0" \
"loguru>=0.7.3,<1" \
"pycryptodomex>=3.20" \
"pillow>=8.4.0,<9" \
"fastapi>=0.83,<0.84" \
"uvicorn>=0.16,<0.17" \
"pytest>=6.2.5,<7" \
"pytest-asyncio>=0.16,<0.17"
- name: Run Python 3.6 pytest
env:
PYTHONPATH: ${{ github.workspace }}
run: python -m pytest -c /dev/null