-
Notifications
You must be signed in to change notification settings - Fork 40
51 lines (43 loc) · 1.19 KB
/
python.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
name: Python tests
on:
workflow_dispatch:
pull_request:
branches: [master]
paths:
- '**/CMakeLists.txt'
- '**.cpp'
- '**.h'
- '**.py'
- 'external/**'
jobs:
tests:
name: ${{ matrix.os }} • Py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python-version }}"
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1.9.0
if: runner.os == 'Windows'
- name: Set Windows variables
if: runner.os == 'Windows'
shell: bash
run: |
echo "CC=cl.exe" >> $GITHUB_ENV
echo "CXX=cl.exe" >> $GITHUB_ENV
- name: Install from source
run: |
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install .
- name: Run tests
run: |
pytest --import-mode importlib -v python/test/