testing #614
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: testing | |
on: | |
push: | |
pull_request: | |
# weekly | |
schedule: | |
- cron: '3 7 * * 4' | |
jobs: | |
testing: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.9', '3.10', '3.11', '3.12'] | |
# exclude: | |
# - os: windows-latest | |
# python-version: '3.9' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system dependencies in Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt install -y python3-tk libboost-all-dev libopenblas-dev libfftw3-dev libsuitesparse-dev | |
# Do not need to do this if not installing S4 | |
- name: Install system dependencies in MacOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install fftw suite-sparse openblas lapack boost | |
- name: Install python dependencies | |
run: | | |
python -m pip install uv | |
uv pip install --system . | |
uv pip install --system numpy wheel setuptools | |
- name: Install S4 in Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
git clone https://github.com/phoebe-p/S4 | |
cd S4 | |
make S4_pyext | |
cd .. | |
rm -rf S4 | |
# Not working as of March 2024. Cannot find cholmod.h header file. Reason unclear. | |
- name: Install S4 in MacOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
git clone https://github.com/phoebe-p/S4 | |
cd S4 | |
make S4_pyext --file="Makefile.m1" | |
cd .. | |
rm -rf S4 | |
- name: Test with pytest | |
env: | |
NUMBA_DISABLE_JIT: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' && '1' || '0' }} | |
run: | | |
uv pip install --system pytest-cov pytest-rerunfailures | |
pytest --cov-report= --cov=rayflare tests/ --reruns 5 | |
- name: Codecov | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: | | |
uv pip install --system codecov | |
codecov |