-
Notifications
You must be signed in to change notification settings - Fork 126
90 lines (74 loc) · 2.27 KB
/
ci.yaml
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: Test pgenlib
on:
push:
paths:
- 2.0/Python/**
- .github/workflows/ci.yaml
jobs:
wheel:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-latest]
python-version: [7, 8, 9, 10, 11, 12]
exclude:
- python-version: 7
os: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: 3.${{ matrix.python-version }}
- name: Install prerequisites
run: |
pip install -U pip
pip install pytest
- name: Build and install
working-directory: ./2.0/Python
run: |
mkdir -p dist
pip wheel --wheel-dir dist --no-deps .
pip install dist/*.whl
- name: Run tests
working-directory: ./2.0/Python
run: |
pytest tests/
- name: Test against oldest supported numpy version
working-directory: ./2.0/Python
if: matrix.python-version <= 8 && matrix.os != 'macos-latest'
run: |
pip install --force-reinstall --no-cache-dir 'numpy==1.19.0'
pytest tests/
- name: Test against newest numpy version
working-directory: ./2.0/Python
run: |
pip install -U numpy
pytest tests/
sdist:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [8, 12]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: 3.${{ matrix.python-version }}
- name: Install prerequisites
run: |
pip install -U pip
pip install build pytest
- name: Build and install
working-directory: ./2.0/Python
run: |
python -m build . --sdist
pip install --no-cache-dir --no-binary=pgenlib dist/pgenlib-*.tar.gz
- name: Run tests
working-directory: ./2.0/Python
run: |
pytest tests/