-
-
Notifications
You must be signed in to change notification settings - Fork 55
83 lines (69 loc) · 1.98 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Run tests
on: [push, pull_request, workflow_dispatch]
jobs:
# Tests that are platform-agnostic.
universal:
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/checkout@v2
- name: Installing platform dependencies
run: >
sudo apt-get install -y
build-essential
clang
- name: Installing python dependencies
env:
BUILD_WITH_CYTHON: 1
BUILD_FOR_DEBUG: 1
run: |
python -m pip install --upgrade pip wheel
pip install cython setuptools
pip install -e '.[test]'
rm simdjson/csimdjson.cpp
python setup.py develop
- name: Running tests with pytest
run: |
coverage run -m pytest
- name: Generating coverage report
run: |
coverage report -m
- name: Checking flake8
run: |
flake8
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
# Python needs to be setup before checkout to prevent files from being
# left in the source tree. See setup-python/issues/106.
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
- name: Installing platform dependencies
if: matrix.os == 'ubuntu-latest'
run: >
sudo apt-get install -y
build-essential
clang
- name: Installing python dependencies
env:
BUILD_WITH_CYTHON: 1
run: |
python -m pip install --upgrade pip wheel
pip install cython setuptools
pip install -e '.[test]'
rm simdjson/csimdjson.cpp
python setup.py develop
- name: Running tests with pytest
run: |
pytest