Support multiple skip axes in iter_indices and broadcast_shapes #305
Workflow file for this run
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
name: Tests | |
on: [push, pull_request] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12-dev'] | |
# https://numpy.org/neps/nep-0029-deprecation_policy.html | |
numpy-version: ['1.22', 'latest', 'dev'] | |
exclude: | |
- python-version: '3.12-dev' | |
numpy-version: '1.22' | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
set -x | |
set -e | |
python -m pip install pyflakes pytest pytest-doctestplus hypothesis pytest-cov pytest-flakes packaging | |
if [[ ${{ matrix.numpy-version }} == 'latest' ]]; then | |
python -m pip install --pre --upgrade numpy | |
elif [[ ${{ matrix.numpy-version }} == 'dev' ]]; then | |
python -m pip install --pre --upgrade --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy | |
else | |
python -m pip install --upgrade numpy==${{ matrix.numpy-version }}.* | |
fi | |
- name: Run Tests | |
run: | | |
set -x | |
set -e | |
python -We:invalid -We::SyntaxWarning -m compileall -f -q ndindex/ | |
# The coverage requirement check is done by the coverage report line below | |
PYTEST_FLAGS="$PYTEST_FLAGS -v --cov-fail-under=0"; | |
pytest $PYTEST_FLAGS | |
./run_doctests | |
# Make sure it installs | |
python setup.py install | |
# Coverage. This also sets the failing status if the | |
# coverage is not 100%. Travis sometimes cuts off the last command, which is | |
# why we print stuff at the end. | |
if ! coverage report -m; then | |
echo "Coverage failed"; | |
false; | |
else | |
echo "Coverage passed"; | |
fi; |