Skip to content

test tf 2.15

test tf 2.15 #238

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
SDSS_LOCAL_SAS_MIRROR: ./ci_data/
GAIA_TOOLS_DATA: ./ci_data/
LASMOT_DR5_DATA: ./ci_data/
strategy:
fail-fast: false
matrix:
include:
- { TF_VER: 2.15.0, TFP_VER: 0.23.0, PAPER_MODELS: true, ALLOW_FAILURE: false }
- { TF_VER: 2.15.0, TFP_VER: 0.23.0, PAPER_MODELS: false, ALLOW_FAILURE: false }
- { TF_VER: 2.14.0, TFP_VER: 0.22.1, PAPER_MODELS: true, ALLOW_FAILURE: false }
- { TF_VER: 2.14.0, TFP_VER: 0.22.1, PAPER_MODELS: false, ALLOW_FAILURE: false }
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install tensorflow==${{ matrix.TF_VER }}
pip install tensorflow-probability==${{ matrix.TFP_VER }}
pip install coveralls pydot graphviz pytest pytest-cov
pip install .
python -c "from astroNN.config import tf_patch; tf_patch()"
- name: Cache test data
uses: actions/cache@v3
with:
path: ${{github.workspace}}/ci_data/
key: astronn-${{ runner.os }}-${{ matrix.TF_VER }}-${{ matrix.PAPER_MODELS }}-2023april30
- name: Test astroNN
continue-on-error: ${{ matrix.ALLOW_FAILURE }}
if: ${{ matrix.PAPER_MODELS == false}}
# Run almost all tests for latest config
run: >
python -m pytest --cov astroNN --cov-report=xml tests/test_numpy_tools.py tests/test_loss_func.py
tests/test_layers.py tests/test_apogee_tools.py tests/test_datasets.py tests/test_gaia_tools.py
tests/test_lamost_tools.py tests/test_models.py tests/test_utilities.py tests/test_neuralODE.py
--disable-pytest-warnings
# Run papers models test
- name: Test paper models
continue-on-error: ${{ matrix.ALLOW_FAILURE }}
if: ${{ matrix.PAPER_MODELS == true}}
run: >
python -m pytest --cov astroNN --cov-report=xml tests/test_apogee_model.py tests/test_paper_models.py
--disable-pytest-warnings
- name: Upload coverage reports to Codecov
continue-on-error: ${{ matrix.ALLOW_FAILURE }}
uses: codecov/codecov-action@v3
env:
TF_VER: ${{ matrix.TF_VER }}
TFP_VER: ${{ matrix.TFP_VER }}
PAPER_MODELS: ${{ matrix.PAPER_MODELS }}
with:
flags: unittests
env_vars: TF_VER, TFP_VER, PAPER_MODELS
name: codecov-astroNN
fail_ci_if_error: true
verbose: true