Skip to content

Test vs numpy 2

Test vs numpy 2 #47

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: ['*']
workflow_dispatch: # allows you to trigger manually
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
build:
name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.requirements }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
requirements: [latest]
include:
# Test on macos and windows (first and last version of python only)
- os: macos
python-version: '3.8'
requirements: latest
- os: macos
python-version: '3.12'
requirements: latest
- os: windows
python-version: '3.8'
requirements: latest
- os: windows
python-version: '3.12'
requirements: latest
# Test on minimal requirements
- os: ubuntu
python-version: '3.8'
requirements: minimal
# Very old packages are not available on macos-arm64
# - os: macos
# python-version: '3.8'
# requirements: minimal
- os: windows
python-version: '3.8'
requirements: minimal
# Test on nightly builds of requirements
- os: ubuntu
python-version: '3.12'
requirements: upstream
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: ci/requirements-${{ matrix.requirements }}.yml
activate-environment: ndcsv
- name: Install nightly builds
if: ${{ matrix.requirements == 'upstream' }}
run: |
# Pick up https://github.com/mamba-org/mamba/pull/2903
mamba install -n base 'mamba>=1.5.2'
mamba uninstall --force numpy pandas pyarrow
python -m pip install --no-deps --pre --prefer-binary \
--extra-index-url https://pypi.fury.io/arrow-nightlies/ \
pyarrow
python -m pip install --no-deps --pre \
-i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
numpy pandas
- name: Show conda options
run: conda config --show
- name: conda info
run: conda info
- name: conda list
run: conda list
- name: Install
run: python -m pip install --no-deps -e .
- name: pytest
run: py.test --verbose --cov=ndcsv --cov-report=xml
- name: codecov.io
uses: codecov/codecov-action@v3