forked from ufs-community/ufs-srweather-app
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.12 KB
/
python_unittests.yaml
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
name: Python unittests
on:
push:
branches:
- develop
- 'release/*'
pull_request:
branches:
- develop
- 'release/*'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
python_unittests:
name: Python unittests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Install dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install python3 python3-pip netcdf-bin
sudo pip3 install pyyaml jinja2==2.11 f90nml
sudo pip3 install numpy matplotlib basemap
# Run python unittests
- name: Run python unittests
run: |
./manage_externals/checkout_externals ufs-weather-model
cd ush
python3 -m unittest -b python_utils/test_python_utils.py
# exclude test_retrieve_data that is tested in functional test
files=$(find . -maxdepth 1 -name '*.py' -a ! -name 'test_retrieve_data.py' -exec basename {} \;)
files=$(echo $(echo "${files[@]}"))
python3 -m unittest -b ${files[@]}