shfmt #133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: push | |
jobs: | |
test: | |
strategy: | |
matrix: | |
shell: [bash, zsh] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install zsh | |
if: matrix.shell == 'zsh' && matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install zsh | |
- name: Ensure PATH directories exist | |
run: | | |
mkdir -p "$HOME/.local/bin" | |
sudo mkdir -p "/usr/local/bin" | |
sudo mkdir -p "/usr/local/sbin" | |
- name: Install dotfiles | |
run: ./install.sh | |
- name: Print version | |
run: ${{ matrix.shell }} --version | |
- name: Script | |
run: | | |
env -i HOME="$HOME" ${{ matrix.shell }} ./test/${{ matrix.shell }}/nonlogin-noninteractive.sh | |
- name: Interactive | |
run: | | |
env -i HOME="$HOME" ${{ matrix.shell }} -i ./test/${{ matrix.shell }}/nonlogin-interactive.sh | |
- name: Login | |
run: | | |
env -i HOME="$HOME" ${{ matrix.shell }} -l ./test/${{ matrix.shell }}/login-noninteractive.sh | |
- name: Login / Interactive | |
run: | | |
env -i HOME="$HOME" ${{ matrix.shell }} -l -i ./test/${{ matrix.shell }}/login-interactive.sh |