name: Test

on:
  push:
    branches:
      - '*'
  pull_request:
    branches:
      - '*'

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        # ubuntu-20.04 available: https://github.com/actions/virtual-environments/issues/1816
        os: [ubuntu-latest, windows-latest, macos-latest]
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
          submodules: false
      - name: Upgrade bash on Mac
        if: runner.os == 'macOs'
        run: brew install bash
      - name: Install oh-my-bash
        shell: bash
        run: bash --noprofile --norc -i "$PWD/.github/workflows/test.sh"
