-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (45 loc) · 1.3 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
name: Run Tests
on: [push, pull_request]
env:
PYTEST_ADDOPTS: "--color=yes"
PYTHONWARNINGS: error
jobs:
run_pytest:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: ["3.8", "3.12", "3.13-dev"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
# TODO: remove this once the warning is fixed in Python 3.13-dev:
env:
PYTHONWARNINGS: error,default::DeprecationWarning
with:
python-version: ${{ matrix.python-version }}
- name: Double-check Python version
run: |
python --version
- name: Checkout submodules
run: |
python tests/update_submodules.py
- name: Upgrade pip
env:
PYTHONWARNINGS: error,default::DeprecationWarning
run: |
python -m pip install pip --upgrade
- name: Install Python package
env:
PYTHONWARNINGS: error,default::DeprecationWarning
run: |
python -m pip install .
- name: Install test dependencies
env:
PYTHONWARNINGS: error,default::DeprecationWarning
run: |
python -m pip install -r tests/requirements.txt
- name: Run pytest
run: |
python -m pytest