Test against np2 #124
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow builds the sdist on 3.8 and then installs that same sdist on | |
name: Create sdist install and test | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- name: Build sdist | |
run: | | |
set -x | |
pip install --upgrade pip | |
pip install build | |
pip freeze | |
python -m build . --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: the-sdist | |
path: dist/scikit_surprise* | |
install-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: the-sdist | |
path: dist/ | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install sdist | |
run: | | |
set -x | |
pip install --upgrade pip | |
pip install "numpy==2.0.0rc2" | |
python -c "import numpy; print(f'{numpy.__version__ = }')" | |
pip install dist/scikit_surprise-1.1.4.tar.gz -v | |
python -c "import numpy; print(f'{numpy.__version__ = }')" | |
- name: Pip freeze | |
run: | | |
pip freeze | |
- name: Run unit tests | |
run: | | |
pip install pandas pytest # Or just use pip install ...[test] ? | |
pytest -v |