Skip to content

Update to support matplotlib 3.9 and new numpy boolean math restrictions #49

Update to support matplotlib 3.9 and new numpy boolean math restrictions

Update to support matplotlib 3.9 and new numpy boolean math restrictions #49

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build and Test (PR)
on:
pull_request:
branches: [ '**' ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge,defaults
channel-priority: strict
show-channel-urls: true
miniforge-version: latest
miniforge-variant: Mambaforge
- name: Configure conda and install code
shell: bash -l {0}
run: |
mamba install -y --file requirements.txt --file requirements-dev.txt python-build
python -m pip install --no-deps --no-build-isolation .
- name: test versions
shell: bash -l {0}
run: |
pip uninstall skyproj --yes
[[ $(python setup.py --version) != "0.0.0" ]] || exit 1
rm -rf dist/*
python setup.py sdist
pip install --no-deps --no-build-isolation dist/*.tar.gz
pushd ..
python -c "import skyproj; assert skyproj.__version__ != '0.0.0'"
popd
pip uninstall skyproj --yes
rm -rf dist/*
python -m build --sdist . --outdir dist
pip install --no-deps --no-build-isolation dist/*.tar.gz
pushd ..
python -c "import skyproj; assert skyproj.__version__ != '0.0.0'"
popd
pip uninstall skyproj --yes
python -m pip install --no-deps --no-build-isolation .
- name: Lint with flake8
shell: bash -l {0}
run: |
# stop the build if it fails flake8 with default pyproject.toml
flake8 . --count --show-source --statistics
- name: Test with pytest
shell: bash -l {0}
run: |
pytest