Skip to content

Commit

Permalink
Merge pull request #105 from fusion-energy/conda-in-ci
Browse files Browse the repository at this point in the history
Split jobs in CI
  • Loading branch information
shimwell authored Nov 26, 2024
2 parents 8f6e1bb + 413b5db commit e8351f0
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,35 @@ 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
shell: bash -l {0}
run: |
conda install -y -c conda-forge openmc
pip install .[tests]
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 .
- name: Test import
shell: bash -l {0}
run: |
python -c "import openmc_plasma_source"
pip install .[tests]
- name: Run tests
shell: bash -l {0}
run: |
pytest -v tests
- 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
Expand Down

0 comments on commit e8351f0

Please sign in to comment.