-
Notifications
You must be signed in to change notification settings - Fork 9
90 lines (75 loc) · 2.21 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Tests
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:
workflow: '*'
env:
MPLBACKEND: agg
jobs:
# Make sure all necessary files are included in a release
check-manifest:
name: check manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install manifix
- name: Check MANIFEST.in file
run: |
python setup.py manifix
tests:
name: ${{ matrix.os }}-py${{ matrix.python-version }}${{ matrix.LABEL }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11']
include:
- os: ubuntu-latest
python-version: 3.7
DEPENDENCIES: matplotlib==3.3 numba==0.52 numpy==1.19 ray[default]==1.13
LABEL: -oldest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and package
shell: bash
run: |
pip install -U -e .'[tests]'
- name: Install oldest supported version
if: contains(matrix.LABEL, 'oldest')
run: |
pip install ${{ matrix.DEPENDENCIES }}
- name: Install support for multiprocessing and GPU support
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
# The second line is redundant but added for testing of pip
# selectors
run: |
pip install -U -e .'[gpu,parallel]'
pip install -U -e .'[all]'
- name: Display versions of Python, pip and packages
run: |
python -V
pip -V
pip list
- name: Run tests
run: |
pytest --cov=pyebsdindex --pyargs pyebsdindex
- name: Generate line coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
coverage report --show-missing