forked from NOAA-EMC/obs-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some very basic CI capabilities
- Loading branch information
Showing
4 changed files
with
119 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Coding Norms | ||
on: [push] | ||
|
||
jobs: | ||
check_pynorms: | ||
runs-on: ubuntu-latest | ||
name: Check python coding norms with pycodestyle | ||
|
||
steps: | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install pycodestyle | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: obs-monitor | ||
|
||
- name: Run pycodestyle | ||
run: | | ||
cd $GITHUB_WORKSPACE/obs-monitor | ||
pycodestyle -v --config ./.pycodestyle ./ush ./ush/plotObsMon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Unit Tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
ctests: | ||
runs-on: ubuntu-latest | ||
name: Run Unit Tests with ctest | ||
|
||
steps: | ||
|
||
# Setup Python | ||
#- name: Set up Python 3.10 | ||
# uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: 3.10.10 | ||
|
||
# Update conda | ||
- name: Update conda | ||
run: conda update -n base -c defaults conda | ||
|
||
# Install pip | ||
- name: Install pip | ||
run: conda install pip | ||
|
||
- name: Checkout wxflow | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: NOAA-EMC/wxflow | ||
ref: develop | ||
path: wxflow | ||
|
||
- name: Install wxflow | ||
run: | | ||
cd wxflow | ||
$CONDA/bin/pip3 install . | ||
# Install cartopy | ||
- name: Install cartopy | ||
run: conda install -c conda-forge cartopy | ||
|
||
# Clone the eva code | ||
- name: Clone eva repo | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: JCSDA-internal/eva | ||
ref: develop | ||
path: eva | ||
lfs: true | ||
|
||
# Install eva | ||
#- name: Upgrade pip | ||
# run: $CONDA/bin/pip3 install --upgrade pip | ||
- name: Install eva and dependencies | ||
run: $CONDA/bin/pip3 install --use-deprecated=legacy-resolver -r $GITHUB_WORKSPACE/eva/requirements-github.txt --user $GITHUB_WORKSPACE/eva | ||
- name: Put eva in the path | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: obs-monitor | ||
|
||
# - name: Test running plotObsMon | ||
# run: | | ||
# cd $GITHUB_WORKSPACE/obs-monitor/ush | ||
# $CONDA/bin/python3 plotObsMon -i $GITHUB_WORKSPACE/obs-monitor/parm/gfs/gfs_plots.yaml -p 2023110300 | ||
|
||
# - name: Display YAML files | ||
# run: | | ||
# ls $GITHUB_WORKSPACE/obs-monitor/ush |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[pycodestyle] | ||
count = False | ||
ignore = E226,E401,E402,W504 | ||
max-line-length = 160 | ||
statistics = True | ||
exclude = Experimental |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters