-
-
Notifications
You must be signed in to change notification settings - Fork 135
52 lines (40 loc) · 1.24 KB
/
test.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
name: Tests
on: [push, pull_request]
jobs:
benchmarks:
name: 📈 Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: "3.12"
architecture: x64
cache: "poetry"
- run: poetry env use 3.12
- run: poetry install --with test
if: steps.setup-python.outputs.cache-hit != 'true'
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: poetry run pytest tests --benchmark-enable --codspeed
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy3.9', 'pypy3.10']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "tox>=3.28,<5" "tox-gh-actions>=3.2,<4"
- name: Run unit tests with tox
run: tox