Skip to content

Restrict numpy to <2.0.0 #164

Restrict numpy to <2.0.0

Restrict numpy to <2.0.0 #164

name: Unit Tests - Latest Dependencies
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
workflow_dispatch:
jobs:
unit_tests:
name: Python ${{ matrix.python_version }} unit tests with Featuretools ${{ matrix.featuretools_version }}
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12"]
featuretools_version: ["main", "release"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Set up python ${{ matrix.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Build premium primitives package (whl, tar.gz)
run: |
make clean
make package
- name: Install premium primitives via sdist
run: |
cd unpacked_sdist
python -m pip install ".[test]"
- if: ${{ matrix.featuretools_version == 'main' }}
name: Install Featuretools from main
run: |
python -m pip install --force-reinstall git+https://github.com/alteryx/featuretools
- if: ${{ matrix.python_version == 3.9 && matrix.featuretools_version == 'release'}}
name: Generate coverage args
run: echo "coverage_args=--cov=premium_primitives --cov-config=../pyproject.toml --cov-report=xml:../coverage.xml" >> $GITHUB_ENV
- name: Run unit tests
run: |
cd unpacked_sdist
python -m pytest -n auto -s -vv premium_primitives/ ${{ env.coverage_args }}
- if: ${{ matrix.python_version == 3.8 && matrix.featuretools_version == 'release'}}
name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ${{ github.workspace }}/coverage.xml
verbose: true