-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (36 loc) · 1.18 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
name: CI testing
on:
pull_request:
push:
branches:
- main
jobs:
testing:
runs-on: ubuntu-latest
steps:
- name: checkout actions
uses: actions/checkout@v4
- name: install dependencies
shell: bash
run: |
wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3.sh -b -p "${HOME}/conda"
source "${HOME}/conda/etc/profile.d/conda.sh"
source "${HOME}/conda/etc/profile.d/mamba.sh"
mamba activate
mamba install -y -c conda-forge openmc
pip install openmc_data_downloader
openmc_data_downloader -l ENDFB-7.1-NNDC -i Fe56 Be9 Li6 Li7
- name: Install
run: |
python3 -m pip install .
python3 -c "import openmc_plasma_source"
- name: Run tests
run: |
python3 -m pip install .[tests]
python3 -m pytest -v tests
- name: Run examples
run: |
python3 examples/point_source_example.py
python3 examples/ring_source_example.py
python3 examples/tokamak_source_example.py