Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github actions for python unittests. #747

Merged
merged 10 commits into from
May 16, 2022
27 changes: 27 additions & 0 deletions .github/workflows/python_unittests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python unittests
on: [push, pull_request]
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 f90nml
sudo pip3 install numpy matplotlib basemap

# Run python unittests
- name: Run python unittests
run: |
cd ush
python3 -m unittest -b python_utils/test_python_utils.py
python3 -m unittest -b *.py