Skip to content

Added a guiding radius method and test #350

Added a guiding radius method and test

Added a guiding radius method and test #350

Workflow file for this run

name: Tests
on:
push:
branches:
- main
tags:
- '*'
pull_request:
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'docs only')
strategy:
fail-fast: true
matrix:
include:
- name: Code style checks
os: ubuntu-latest
python: 3.x
toxenv: codestyle
- name: Python 3.10 with minimal dependencies and coverage
os: ubuntu-latest
python: '3.10'
toxenv: py310-test-cov
- name: Python 3.9
os: ubuntu-latest
python: '3.9'
toxenv: py39-test
- name: Python 3.10
os: ubuntu-latest
python: '3.10'
toxenv: py310-test
- name: Python 3.11
os: ubuntu-latest
python: '3.11'
toxenv: py311-test
# Has to happen on ubuntu because galpy is finnicky on macOS
- name: Python 3.10 with all optional dependencies
os: ubuntu-latest
python: '3.10'
toxenv: py310-test-extradeps
toxposargs: --durations=50
- name: Python 3.10 without GSL
os: ubuntu-latest
python: '3.10'
toxenv: nogsl
- name: Python 3.9 with oldest supported version of all dependencies
os: ubuntu-latest
python: 3.9
toxenv: py39-test-oldestdeps
# Mac and Windows:
- name: Python 3.10 standard tests (macOS)
os: macos-latest
python: '3.10'
toxenv: py310-test
# - name: Python 3.9 standard tests (Windows)
# os: windows-latest
# python: 3.9
# toxenv: py39-test
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# For animation tests
- uses: FedericoCarboni/setup-ffmpeg@v2
with:
# Not strictly necessary, but it may prevent rate limit
# errors especially on GitHub-hosted macos machines.
token: ${{ secrets.GITHUB_TOKEN }}
id: setup-ffmpeg
- name: Set up Python ${{ matrix.python }} on ${{ matrix.os }}
if: ${{ !startsWith(matrix.os, 'windows') }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
# Windows:
# - uses: conda-incubator/setup-miniconda@v2
# if: startsWith(matrix.os, 'windows')
# with:
# auto-update-conda: true
# python-version: ${{ matrix.python-version }}
# - name: Install Python dependencies - Windows
# if: startsWith(matrix.os, 'windows')
# shell: bash -l {0}
# run: |
# conda install -c conda-forge -q gsl python=3.9 libpython
# python -m pip install -e .[test]
# python -m pip install tox
# - name: Run tests - Windows
# if: startsWith(matrix.os, 'windows')
# shell: bash -l {0}
# run: |
# tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} ${{ matrix.toxposargs }}
# Mac:
- name: Setup Mac - GSL
if: startsWith(matrix.os, 'mac')
run: |
brew install gsl
# Ubuntu:
- name: Setup Linux - GSL
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install gsl-bin libgsl0-dev build-essential
sudo apt-get install libhdf5-serial-dev # TODO: remove when h5py has 3.11 wheels
# Any *nix:
- name: Install Python dependencies - nix
if: ${{ !startsWith(matrix.os, 'windows') }}
run: python -m pip install --upgrade tox codecov
- name: Run tests - nix
if: ${{ !startsWith(matrix.os, 'windows') }}
run: tox -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}
# Coverage:
- name: Upload coverage report to codecov
uses: codecov/[email protected]
if: steps.check_files.outputs.files_exists == 'true' && runner.os == 'Linux'
with:
file: ./coverage.xml # optional