-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (35 loc) · 1.23 KB
/
python-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
# This workflow will install Python dependencies and run tests with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "pypy3.10"]
pytest-version: ["8"]
cython-version: ["0.29", "3"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} [pytest ${{ matrix.pytest-version }}, cython ${{ matrix.cython-version }}]
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install pytest==${{ matrix.pytest-version }}.*
python -m pip install cython==${{ matrix.cython-version }}.*
python -m pip install -e .
- name: Test with pytest
run: |
pytest -vv tests src