-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated to python wget and renamed github action control file
- Loading branch information
1 parent
acc8d3c
commit 6bcc3b5
Showing
2 changed files
with
79 additions
and
10 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,62 @@ | ||
name: CI Unit Tests | ||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
|
||
ci_pytest: | ||
runs-on: ubuntu-latest | ||
name: Run unit tests on CI system | ||
permissions: | ||
checks: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.10+ | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y perl libxml-libxml-perl libxml-libxslt-perl libdatetime-perl | ||
python -m pip install --upgrade pip | ||
pip install pytest 7.2.1 | ||
pip install wxflow 0.2.0 | ||
pip install wget | ||
- name: Cache Rocoto Install | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/rocoto | ||
key: ${{ runner.os }}-rocoto-${{ hashFiles('**/ci-unit_tests.yaml') }} | ||
|
||
- name: Install Rocoto | ||
run: | | ||
if [ ! -d "$HOME/rocoto/bin" ]; then | ||
git clone https://github.com/christopherwharrop/rocoto.git $HOME/rocoto | ||
cd $HOME/rocoto | ||
./INSTALL | ||
fi | ||
echo "$HOME/rocoto/bin" >> $GITHUB_PATH | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
sudo mkdir -p /work/noaa | ||
cd $GITHUB_WORKSPACE/sorc/wxflow | ||
git submodule update --init | ||
cd $GITHUB_WORKSPACE/sorc | ||
./link_workflow.sh | ||
cd $GITHUB_WORKSPACE/ci/scripts/tests | ||
pytest -v --junitxml $GITHUB_WORKSPACE/ci/scripts/tests/test-results.xml | ||
- name: Publish Test Results | ||
if: always() | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
files: ci/scripts/tests/test-results.xml | ||
job_summary: true | ||
comment_mode: off |
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