-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (52 loc) · 1.76 KB
/
mac.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
name: Test on macOS
on: [push, workflow_dispatch]
env:
PRIMARY_PYTHON_VERSION: 3.8
jobs:
test:
runs-on: macos-latest
timeout-minutes: 15
steps:
- name: Setup Python
uses: actions/setup-python@v2
# macOS minutes cost 10x what Linux does, so testing multiple Python versions would be quite costly
with:
python-version: ${{ env.PRIMARY_PYTHON_VERSION }}
- name: Print Python version
run: python -V
- name: Checkout
uses: actions/checkout@v2
- name: Load pip cache
uses: actions/cache@v2
with:
path: .pip
key: pip-${{ runner.os }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
pip-${{ runner.os }}-
pip-
- name: Install requirements
run: |
pip --cache-dir=.pip install --upgrade pip
pip --cache-dir=.pip install --upgrade wheel
pip --cache-dir=.pip install -r requirements.txt -r requirements-dev.txt
- name: Print Numba sysinfo
# On macOS the Numba script is not executable by default and therefore has to be called as a Python module.
run: |
python -m numba --sysinfo | tee numba-sysinfo.txt
- name: Run tests
run: |
set -o pipefail
NUMBA_NESTED_PARALLELISM=0 pytest | tee test-output.txt
coverage json
- name: Upload results
uses: actions/upload-artifact@v2
with:
name: Test results with Numba
path: |
coverage.xml
coverage.json
htmlcov
numba-sysinfo.txt
test-output.txt
test-results
if-no-files-found: error