Skip to content

Merge pull request #110 from fusion-energy/improve-energy-spectrum #280

Merge pull request #110 from fusion-energy/improve-energy-spectrum

Merge pull request #110 from fusion-energy/improve-energy-spectrum #280

Workflow file for this run

name: CI testing
on:
pull_request:
push:
branches:
- main
jobs:
testing:
runs-on: ubuntu-latest
steps:
- name: checkout actions
uses: actions/checkout@v4
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ci-env
miniforge-version: latest
channels: conda-forge
- name: install dependencies
shell: bash -l {0}
run: |
conda install -y -c conda-forge openmc
pip install .[tests]
- name: Test import
shell: bash -l {0}
run: |
python -c "import openmc_plasma_source"
- name: Run tests
shell: bash -l {0}
run: |
pytest tests --cov openmc_plasma_source --cov-report xml --cov-report term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run examples
shell: bash -l {0}
run: |
python examples/point_source_example.py
python examples/ring_source_example.py
python examples/tokamak_source_example.py
python examples/plot_tokamak_ion_temperature.py
python examples/plot_tokamak_neutron_source_density.py
python examples/plot_tokamak_neutron_source_strengths.py
python examples/plot_energy_spectra.py