JOSS submission [do not merge] #274
This file contains 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: 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 |