Skip to content

Moves time explosion off the transport solver to the transport state #3796

Moves time explosion off the transport solver to the transport state

Moves time explosion off the transport solver to the transport state #3796

Workflow file for this run

# For more information about TARDIS pipelines, please refer to:
#
# https://tardis-sn.github.io/tardis/development/continuous_integration.html
name: tests
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
types:
- opened
- reopened
- synchronize
- labeled
workflow_call: # to be called by the pre release workflow
inputs:
pip_git:
description: "Whether or not to install tardis using git"
required: false
type: boolean
default: false
env:
CACHE_NUMBER: 0 # increase to reset cache manually
PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata --tardis-regression-data=${{ github.workspace }}/tardis-regression-data
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
defaults:
run:
shell: bash -l {0}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
codecov:
if: github.repository_owner == 'tardis-sn'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup_env
with:
os-label: linux-64
- name: Generate coverage report
run: |
pytest --cov=tardis --cov-report=xml --cov-report=html
- uses: codecov/codecov-action@v4
if: always()
with:
fail_ci_if_error: true
token: ${{ env.CODECOV_TOKEN }}
verbose: true
tests:
name: ${{ matrix.continuum }} continuum ${{ matrix.rpacket_tracking }} rpacket_tracking ${{ matrix.os }} ${{ inputs.pip_git && 'pip tests enabled' || '' }}
if: github.repository_owner == 'tardis-sn'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
label: [osx-arm64, linux-64]
continuum: ['not', '']
rpacket_tracking: ['not', '']
exclude:
- continuum: ''
rpacket_tracking: ''
include:
- label: osx-arm64
os: macos-latest
prefix: /Users/runner/miniconda3/envs/tardis
- label: linux-64
os: ubuntu-latest
prefix: /usr/share/miniconda3/envs/tardis
steps:
- uses: actions/checkout@v4
- name: Setup LFS
uses: ./.github/actions/setup_lfs
- name: Setup environment
uses: ./.github/actions/setup_env
with:
os-label: ${{ matrix.label }}
- name: Install package editable
if: ${{ !inputs.pip_git }}
run: |
pip install -e . --user
- name: Install package git
if: ${{ inputs.pip_git }}
run: |
pip install git+https://github.com/tardis-sn/tardis.git@master
- name: Run tests
run: pytest tardis ${{ env.PYTEST_FLAGS }} -m "${{ matrix.continuum }} continuum and ${{ matrix.rpacket_tracking }} rpacket_tracking"
- name: Refdata Generation tests
run: pytest tardis ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum and ${{ matrix.rpacket_tracking }} rpacket_tracking"
if: contains(github.event.pull_request.labels.*.name, 'run-generation-tests') || github.ref == 'refs/heads/master'