Bump minversions, update CI #209
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: Spherical Geometry CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*" | |
pull_request: | |
schedule: | |
# Run every Monday at 6am UTC | |
- cron: '0 6 * * 1' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Python Testing ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install numpy | |
python -m pip install -e .[test] | |
- name: Test with pytest | |
run: | | |
pip freeze | |
pytest | |
devdeps: | |
name: Python Testing with dev versions of dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --pre --upgrade --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy | |
python -m pip install --pre --upgrade --extra-index-url https://pypi.anaconda.org/astropy/simple astropy | |
python -m pip install -e .[test] | |
- name: Test with pytest | |
run: | | |
pip freeze | |
pytest | |
doc_build: | |
name: Document Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
sudo apt-get install graphviz texlive-latex-extra dvipng | |
python -m pip install --upgrade pip | |
python -m pip install -e .[docs] | |
- name: Build documents with sphinx | |
run: | | |
pip freeze | |
sphinx-build docs build/docs | |
code_coverage: | |
name: Code Coverage Report | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e .[test] | |
- name: Test with pytest and code coverage | |
run: | | |
pip freeze | |
pytest --cov-report=xml --cov=. --cov-config=setup.cfg | |
- name: Upload coverage to codecoverage | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
bandit: | |
name: Bandit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install bandit | |
- name: Security checks with bandit | |
run: | | |
bandit spherical_geometry -r -x spherical_geometry/tests |