generated from NOAA-OWP/owp-open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 21
63 lines (52 loc) · 1.75 KB
/
test_unit_standalone.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
# Test changes that have been pushed to the master
name: BMI Unit Testing and Model Standalone
# Controls when the action will run.
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
#this will allow a manual trigger
workflow_dispatch:
#env:
#LINUX_NUM_PROC_CORES: 2
#MACOS_NUM_PROC_CORES: 3
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Run general unit tests in linux environment
test_unit:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # windows will fail(?)
python-version: ['3.10', 3.11, 3.12]
fail-fast: false
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout the commit
uses: actions/checkout@v4
- name: setup python # ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#- name: create conda env
# run: $CONDA/bin/conda env create -f environment.yml
- name: activate conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: bmi_lstm
environment-file: ./environment.yml
#python-version: ${{ matrix.python-version }}
# this may not be necessary? tbd..
auto-activate-base: false
- name: install packages
run: |
python -m pip install --upgrade pip
pip install -e .
# RUN MAIN BMI UNIT TEST
- name: Run BMI Unit Test LSTM
run: python lstm/run_bmi_unit_test.py
# RUN MAIN STANDALONE SCRIPT
- name: Run Standalone LSTM
run: python -m lstm