-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (44 loc) · 1.34 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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