Skip to content

added check that niwot.out hasn't changed to github actions #24

added check that niwot.out hasn't changed to github actions

added check that niwot.out hasn't changed to github actions #24

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
jobs:
# try to build SIPNET on Windows, Ubuntu, MacOS
build:

Check failure on line 13 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 13
strategy:
fail-fast: false
matrix:
OS:
- macos-latest
- ubuntu-latest
- ubuntu-20.04
- windows-latest
runs-on: ${{ matrix.OS }}
steps:
# checkout source code
- uses: actions/checkout@v2
# compile sipnet
- name: compile sipnet
run: make
# remove existing test output file
- name: Remove Niwout Output File
run: rm Sites/Niwot/niwot.out
# run single sipnet run
- name: sipnet on Sites/Niwot/niwot
run: ./sipnet
# check output of test
- name: fail if no niwot output exists
if: ${{ hashFiles('Sites/Niwot/niwot.out') == '' }}
run: |
echo "::error title={No Output}::Test run for Niwot site failed to produce output"
exit 1
# check whether niwot.out has changed
- name: Check whether niwot.out has changed
run: |
if git diff --exit-code Sites/Niwot/niwot.out; then
echo "Success: Niwot.out created and has not changed"
else
echo "::error title={Output Changed}::The test file niwot.out has changed"
exit 1
fi