Skip to content

Harmoniza tmctallies #867

Harmoniza tmctallies

Harmoniza tmctallies #867

Workflow file for this run

name: Run Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Apt dependencies
shell: bash
run: |
sudo apt -y update
sudo apt install -y libglu1-mesa \
libglu1-mesa-dev
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test-env
python-version: "3.12"
miniforge-version: latest
channels: conda-forge
auto-activate-base: false
- name: Ensure Python pin is cleared
shell: bash -l {0}
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda config --remove pinned_packages python || true
- name: Install OpenMC via Conda
shell: bash -l {0}
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate test-env
conda install -y pip
conda install -c conda-forge openmc>=0.14.0
- name: Verify OpenMC install
shell: bash -l {0}
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate test-env
which python
python -c "import sys; print(sys.executable)"
python -c "import openmc; print('openmc', openmc.__version__)"
python -c "import site; print(site.getsitepackages())"
conda list openmc
- name: Install pymoab and pydagmc
shell: bash -l {0}
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate test-env
python -m pip install --extra-index-url https://shimwell.github.io/wheels moab
python -m pip install git+https://github.com/svalinn/pydagmc
- name: Install dependencies
shell: bash -l {0}
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate test-env
pip install coveralls
python -m pip install .[tests]
- name: Run tests
shell: bash -l {0}
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate test-env
python -m pytest test/ --cov openmc_fusion_benchmarks --cov-report xml --cov-report term
- name: Upload coverage to Coveralls
shell: bash -l {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate test-env
coveralls || true