---
name: Tests
"on":
  push:
  pull_request:
  schedule:
    # Run tests every Monday at 9:17 to catch regressions.
    - cron: "17 9 * * 1"

jobs:

  tests:
    name: Run full installation
    runs-on: macos-11.0
    steps:
      - uses: actions/checkout@v2.3.4
      - name: Install Zsh
        run: |
          brew install zsh
      - name: Force default shell
        # GitHub macOS images forces bash as default:
        #   https://github.com/actions/virtual-environments/blob
        #   /0d93dd2fc97a0708d5f35ccda0e1be53c996630d/images/macos/provision
        #   /configuration/shell-change.sh#L3-L5
        run: |
          sudo chsh -s "$(brew --prefix zsh)/bin/zsh" root
          sudo chsh -s "$(brew --prefix zsh)/bin/zsh" $USERNAME
      - name: Fix GitHub worker
        # aws-cli is already installed by hand in GitHub action runners.
        # Remove it to avoid "brew install --formula awscli" error.
        run: |
          rm /usr/local/bin/aws
      - name: Run install
        run: |
          zsh ./install.sh

---
name: Tests
"on":
  push:
  pull_request:
  schedule:
    # Run tests every Monday at 9:17 to catch regressions.
    - cron: "17 9 * * 1"

jobs:

  tests:
    name: Run full installation
    runs-on: macos-11.0
    steps:
      - uses: actions/checkout@v2.3.4
      - name: Install Zsh
        run: |
          brew install zsh
      - name: Force default shell
        # GitHub macOS images forces bash as default:
        #   https://github.com/actions/virtual-environments/blob
        #   /0d93dd2fc97a0708d5f35ccda0e1be53c996630d/images/macos/provision
        #   /configuration/shell-change.sh#L3-L5
        run: |
          sudo chsh -s "$(brew --prefix zsh)/bin/zsh" root
          sudo chsh -s "$(brew --prefix zsh)/bin/zsh" $USERNAME
      - name: Fix GitHub worker
        # aws-cli is already installed by hand in GitHub action runners.
        # Remove it to avoid "brew install --formula awscli" error.
        run: |
          rm /usr/local/bin/aws
          rm /usr/local/bin/aws_completer
      - name: Run install
        run: |
          zsh ./install.sh

Remove conflicting pre-install aws-cli binaries.
Remove conflicting pre-install aws-cli binaries.