name: ci
on:
push:
branches: [master]
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- run: cargo fmt --check
- run: cargo clippy --all-targets -- -D warnings
- run: cargo test
- run: cargo build
- name: Install fish, zsh, tcsh and expect (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update -qq && sudo apt-get install -y -qq fish zsh tcsh expect
- name: Install fish (macOS)
if: runner.os == 'macOS'
run: brew install fish
- name: Every shell fixes a typo from its own history
if: runner.os != 'Windows'
run: PATH="$PWD/target/debug:$PATH" WELP_REQUIRE_ALL=1 sh ci/shells.sh
- name: PowerShell fixes a typo from its own history
shell: pwsh
run: |
$env:PATH = (Join-Path $PWD 'target/debug') + [IO.Path]::PathSeparator + $env:PATH
./ci/powershell.ps1