-
Notifications
You must be signed in to change notification settings - Fork 899
45 lines (38 loc) · 1.19 KB
/
python-package-pip.yml
File metadata and controls
45 lines (38 loc) · 1.19 KB
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
name: Unit tests
on:
push:
branches: master
pull_request:
branches: master
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
env:
GITHUB_ACTIONS_CI: true
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies (pip)
run: |
python -m pip install --upgrade pip
# Fixing #982 by pinning numpy to a version compatible with numba
pip install "numpy>=1.22,<2.4"
pip install pytest coverage
pip install -e .
- name: Show dependency versions
run: |
python -c "import numpy; print('NumPy:', numpy.__version__)"
python -c "import scipy; print('SciPy:', scipy.__version__)"
python -c "import sklearn; print('Scikit-learn:', sklearn.__version__)"
python -c "import pandas; print('Pandas:', pandas.__version__)"
- name: Run tests
run: |
coverage run --source=mlxtend --branch -m pytest mlxtend
coverage xml
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4