-
Notifications
You must be signed in to change notification settings - Fork 32
77 lines (68 loc) · 2.2 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI testing
on:
pull_request:
branches:
- dev
- main
paths-ignore:
- "**.md"
- "**.txt"
- "**.cff"
- 'docs/**'
- '.gitignore'
push:
branches:
- main
jobs:
testing:
name: CI (Python=${{ matrix.python-version }}, OS=${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.11"]
include:
- python-version: "3.8"
os: "ubuntu-latest"
- python-version: "3.9"
os: "ubuntu-latest"
- python-version: "3.10"
os: "ubuntu-latest"
steps:
- name: checkout actions
uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
- name: install dependencies
run: conda install -c conda-forge freecad -y
- name: install package
run: |
python -m pip install --upgrade pip
python -m pip install .
geouned_cadtocsg --help
python -c 'import geouned'
python -c 'from geouned import CadToCsg'
python -c 'from geouned.GEOReverse import reverse'
python -m pip install .[tests]
- name: testing package version
run: |
python -m pytest -v tests/test_version.py
- name: testing GEOUNED functionality
run: |
python -m pytest -v tests/test_convert.py
geouned_cadtocsg -i tests/config_complete_defaults.json
geouned_cadtocsg -i tests/config_non_defaults.json
- name: install openmc
if: ${{ matrix.os == 'ubuntu-latest'}}
run: conda install -c conda-forge openmc -y
- name: testing with OpenMC
if: ${{ matrix.os == 'ubuntu-latest'}}
run: |
python -m pytest -v tests/test_volumes.py
python -m pytest -v tests/test_transport.py