-
Notifications
You must be signed in to change notification settings - Fork 25
85 lines (69 loc) · 2.61 KB
/
CI_LandBOSSE.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
78
79
80
81
82
83
84
name: CI_LandBOSSE
# We run CI on push commits and pull requests on all branches
on: [push, pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_pip:
name: Pip Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: False
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Pip Install Dependencies
shell: pwsh
run: |
python -m pip install --upgrade pip install pytest pandas numpy scipy xlsxwriter openpyxl openmdao
- name: Pip Install LandBOSSE
shell: pwsh
run: |
pip install -e . -v
# Validate
- name: Pip Validation
shell: pwsh
run: |
python main.py --input project_input_template --output project_input_template --validate
# Run tests
- name: Pip Run pytest
shell: pwsh
run: |
pytest landbosse/tests
build_conda:
name: Conda Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: False
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
# https://github.com/marketplace/actions/setup-miniconda
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
# Install
- name: Conda Install LandBOSSE
shell: pwsh
run: |
pip install -e . -v
# Validate
- name: Conda Validation
shell: pwsh
run: |
python main.py --input project_input_template --output project_input_template --validate
# Run tests
- name: Conda Run pytest
shell: pwsh
run: |
pytest landbosse/tests