name: Installation script on: pull_request: paths: - .ci/install.sh push: branches: - master paths: - .ci/install.sh jobs: test_against_latest_release: name: Test against latest release strategy: matrix: shell: [fish, zsh, bash] setup: - os: ubuntu script_arguments: '' - os: macos script_arguments: '' - os: macos script_arguments: '--force-no-brew' runs-on: ${{ matrix.setup.os }}-latest steps: - uses: actions/checkout@v2 - run: "sudo apt-get install -y ${{ matrix.shell }}" name: Install ${{matrix.shell}} using apt-get if: matrix.setup.os == 'ubuntu' - run: "brew install ${{ matrix.shell }}" name: Install ${{matrix.shell}} using Homebrew if: matrix.setup.os == 'macos' - run: "cp ~/.bashrc ~/.bashrc.bak && echo '. ~/.bashrc.bak' > ~/.bashrc" name: reset bashrc file - run: "env SHELL=$(which ${{ matrix.shell }}) bash ./.ci/install.sh ${{ matrix.setup.script_arguments }}" name: Run the installation script - run: ./.ci/test_installation_script.sh ${{ matrix.shell }} name: 'Test installation script'