name: bash_unit CI
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  ubuntu:
    runs-on: ubuntu-latest
    if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"

    steps:
    - uses: actions/checkout@v2

    - name: install Ubuntu dependencies with sudo apt install -y
      run: sudo apt install -y gawk

    - name: Unit testing with bash_unit
      run: ./run_tests.sh

  macos:
    runs-on: macos-latest
    if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]') && contains(toJSON(github.event.commits.*.message), '[macos]')"

    steps:
    - uses: actions/checkout@v2

    - name: install MacOS dependencies with brew install
      run: brew install gawk

    - name: Unit testing with bash_unit
      run: ./run_tests.sh
