Mag vs dm #2
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: CI Tests | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
pull_request: | |
env: | |
SETUP_XVFB: True # avoid issues if mpl tries to open a GUI window | |
jobs: | |
ci-tests: | |
name: Python-${{ matrix.python }}, deps=${{ matrix.deps }} | |
runs-on: ${{ matrix.os }} | |
if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))" | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python: ['3.11', '3.12'] | |
deps: [current, numpy211, astropydev, numpydev, astropydev-numpydev] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install base dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Test with numpy = 2.1.1 | |
if: "contains(matrix.deps, 'numpy211')" | |
run: | | |
python -m pip install numpy==2.1.1 | |
- name: Test with dev version of numpy | |
if: "contains(matrix.deps, 'numpydev')" | |
run: | | |
python -m pip install git+https://github.com/numpy/numpy.git#egg=numpy | |
- name: Test with dev version astropy | |
if: "contains(matrix.deps, 'astropydev')" | |
run: | | |
python -m pip install git+https://github.com/astropy/astropy.git#egg=astropy | |
- name: Install frb requirements | |
run: | | |
python -m pip install wheel scipy IPython | |
python -m pip install git+https://github.com/FRBs/ne2001.git#egg=ne2001 | |
python -m pip install git+https://github.com/FRBs/astropath.git#egg=astropath | |
python -m pip install git+https://github.com/linetools/linetools#egg=linetools | |
python -m pip install -r frb/requirements.txt | |
- name: Install numba | |
run: | | |
python -m pip install numba | |
- name: Install astroquery | |
run: | | |
python -m pip install astroquery | |
- name: Print Python, pip, astropy, numpy, and setuptools versions | |
run: | | |
python -c "import sys; print(f'Python {sys.version}')" | |
python -c "import pip; print(f'pip {pip.__version__}')" | |
python -c "import astropy; print(f'astropy {astropy.__version__}')" | |
python -c "import numpy; print(f'numpy {numpy.__version__}')" | |
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')" | |
- name: Run tests | |
run: tox -e ${{ matrix.python }}-${{ matrix.toxenv }} | |
codestyle: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Python codestyle check | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install base dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pycodestyle | |
- name: Check for runtime errors using pycodestyle | |
run: | | |
pycodestyle frb --count --select=E9 |