Merge pull request #7 from SteSeg/harmoniza_tmctallies #863
This file contains hidden or 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: 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 |