Skip to content

fix missing if in test script #355

fix missing if in test script

fix missing if in test script #355

name: Ubuntu build and test
on:
push:
branches: [ master ]
jobs:
ubuntu2204build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Update apt-get
run: sudo apt-get update
- name: Fix
run: sudo apt-get install -f
- name: Install gfortran
run: sudo apt-get install gfortran
- name: Install ghostscript
run: sudo apt-get install ghostscript
- name: Install shellcheck
run: sudo apt-get install shellcheck
- name: make VaST
run: make
- name: Shellcheck VaST BASH scripts
run: |
for i in lib/*sh util/*sh util/transients/*sh util/examples/*sh; do
shellcheck --severity=error $i
done
ubuntuLatestBuildAndTest:
needs: ubuntu2204build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update apt-get
run: sudo apt-get update
- name: Install gfortran
run: sudo apt-get install gfortran
- name: Install ghostscript
run: sudo apt-get install ghostscript
- name: Install shellcheck
run: sudo apt-get install shellcheck
- name: make VaST
run: make
- name: Syntax-check the test script
run: bash -n util/examples/test_vast.sh
- name: Syntax-check the NMW transient search script
run: bash -n util/transients/transient_factory_test31.sh
- name: Check commit message
id: check_commit
run: |
commit_message=$(git log --format=%B -n 1 ${{ github.event.after }})
if [[ "${commit_message}" == *"notest"* ]]; then
echo "Commit contains 'notest'. Skipping tests."
echo "SKIP=true" >> $GITHUB_ENV
else
echo "SKIP=false" >> $GITHUB_ENV
fi
- name: Prepare for the test
run: echo "1" > ../THIS_IS_HPCC
if: env.SKIP != 'true'
- name: Test VaST
run: util/examples/test_vast.sh
if: env.SKIP != 'true'