-
Notifications
You must be signed in to change notification settings - Fork 45
36 lines (31 loc) · 1.26 KB
/
main.yml
File metadata and controls
36 lines (31 loc) · 1.26 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
name: build and test
on:
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Python maintains 5 versions, along with the to-be-released version. Every October, this changes.
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.10']
os: [ macos-latest, ubuntu-latest, windows-latest ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create a virtual environment
run: git submodule init && git submodule update && python3 -m venv ./venv
- name: Activate Virtual Environment for Windows.
if: matrix.os == 'windows-latest'
run: . venv/Scripts/activate
- name: Activate Virtual Environment for Linux and Mac
if: matrix.os != 'windows-latest'
run: . venv/bin/activate
- run: python -m pip install build
- run: python -m pip install '.[test]'
# Run our tests, but do not run the benchmark tests since they pull in libraries that do not have pypy support.
- run: py.test --ignore tests/test_benchmark_cli.py --ignore tests/test_benchmark_spec.py