Skip to content

FIX empty slice case #196

FIX empty slice case

FIX empty slice case #196

Workflow file for this run

name: tests
on:
push:
branches:
- master
pull_request: null
env:
PY_COLORS: "1"
jobs:
tests:
name: tests
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"]
npver: ["1.20", "1.21", "1.23", "1.26", "2.0"]
exclude:
- pyver: "3.11"
npver: "1.20"
- pyver: "3.11"
npver: "1.21"
- pyver: "3.10"
npver: "1.20"
- pyver: "3.12"
npver: "1.20"
- pyver: "3.12"
npver: "1.21"
- pyver: "3.12"
npver: "1.23"
- pyver: "3.8"
npver: "2.0"
- pyver: "3.8"
npver: "1.26"
runs-on: ${{ matrix.os }}
steps:
- name: cancel previous runs
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.pyver }}
channels: conda-forge/label/numpy_rc,conda-forge,defaults
channel-priority: strict
show-channel-urls: true
miniforge-version: latest
miniforge-variant: Mambaforge
- name: install conda deps
shell: bash -l {0}
run: |
conda list
mamba install numpy=${{ matrix.npver }} nose cython wget make pytest flake8
if [ "${{ matrix.pyver }}" == "3.8" ] || [ "${{ matrix.pyver }}" == "3.9" ] || [ "${{ matrix.pyver }}" == "3.10" ]; then
mamba install importlib_resources
fi
- name: build external cfitsio
shell: bash -l {0}
run: |
mkdir cfitsio-external-build
cd cfitsio-external-build
wget https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.2.0.tar.gz
tar -xzvf cfitsio-4.2.0.tar.gz
cd cfitsio-4.2.0
./configure --disable-shared --prefix=$HOME/cfitsio-static-install
make install -j 4
cd ..
cd ..
- name: test non-bundled build
shell: bash -l {0}
run: |
pip install -vv -e . \
--global-option="build_ext" \
--global-option="--use-system-fitsio" \
--global-option="--system-fitsio-includedir=$HOME/cfitsio-static-install/include" \
--global-option="--system-fitsio-libdir=$HOME/cfitsio-static-install/lib"
SKIP_BZIP_TEST=true pytest -vv fitsio
- name: test non-bundled build w/ env vars
shell: bash -l {0}
run: |
rm -rf build*
find . -name "*.so" -type f -delete
export FITSIO_USE_SYSTEM_FITSIO=1
export FITSIO_SYSTEM_FITSIO_INCLUDEDIR=$HOME/cfitsio-static-install/include
export FITSIO_SYSTEM_FITSIO_LIBDIR=$HOME/cfitsio-static-install/lib
pip install -vv -e .
SKIP_BZIP_TEST=true pytest -vv fitsio
- name: test bundled build
shell: bash -l {0}
run: |
rm -rf build*
rm -rf $HOME/cfitsio-static-install
find . -name "*.so" -type f -delete
pip install -vv -e .
SKIP_BZIP_TEST=true pytest -vv fitsio
- name: flake8
shell: bash -l {0}
run: |
flake8 fitsio