-
Notifications
You must be signed in to change notification settings - Fork 373
67 lines (62 loc) · 1.92 KB
/
tests.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Run tests
on: [pull_request, push]
jobs:
test:
strategy:
fail-fast: false
matrix:
name-prefix: ['']
os: [ubuntu-latest]
python: [3.8, 3.9, '3.10', 3.11, 3.12-dev, pypy-3.10, pyodide]
include:
# To keep the overall number of runs low, we test Windows and MacOS
# only on the latest CPython.
- name-prefix: 'win-'
os: windows-latest
python: 3.11
- name-prefix: 'mac-'
os: macos-latest
python: 3.11
name: ${{ format('{0}{1}', matrix.name-prefix, matrix.python) }}
runs-on: ${{ matrix.os }}
env:
TERM: xterm-256color
# This is needed to avoid a terminfo-related crash when
# testing PyPy.
PYTHONPATH: .
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v3
- if: ${{ matrix.python != 'pyodide' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- if: ${{ matrix.python == 'pyodide' }}
uses: actions/setup-python@v4
with:
python-version: 3.11
- if: ${{ matrix.python == 'pyodide' }}
uses: actions/setup-node@v3
- name: Install
shell: bash
run: |
if [[ ${{ matrix.python }} = pyodide ]] ; then
pip install 'pydantic < 2'
# https://github.com/pyodide/pyodide/pull/3971
npm install pyodide
pip install pyodide-build
pyodide venv .venv-pyodide
source .venv-pyodide/bin/activate
fi
pip install .
rm -r hy
# We want to be sure we're testing the installed version,
# instead of running from the source tree.
pip install pytest
- name: Test
shell: bash
run: |
if [[ ${{ matrix.python }} = pyodide ]] ; then
source .venv-pyodide/bin/activate
fi
python -m pytest tests