Skip to content

Merge pull request #2 from CoodingPenguin/fix/check-ignore-default-wo… #61

Merge pull request #2 from CoodingPenguin/fix/check-ignore-default-wo…

Merge pull request #2 from CoodingPenguin/fix/check-ignore-default-wo… #61

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Lint (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install ShellCheck (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y shellcheck
- name: Install zsh (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y zsh
- name: Install ShellCheck (macOS)
if: runner.os == 'macOS'
run: brew install shellcheck
- name: Run ShellCheck
run: shellcheck install.sh uninstall.sh scripts/render-homebrew-formula.sh
- name: Check zsh syntax
run: zsh -n cwt.sh cwt.plugin.zsh completions/_cwt
- name: Check Formula syntax
run: ruby -c Formula/cwt.rb
bats:
name: BATS Tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install zsh (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y zsh
- name: Install BATS (Ubuntu)
if: runner.os == 'Linux'
run: |
git clone --depth 1 https://github.com/bats-core/bats-core.git /tmp/bats-core
sudo /tmp/bats-core/install.sh /usr/local
- name: Install BATS (macOS)
if: runner.os == 'macOS'
run: brew install bats-core
- name: Run BATS tests
run: bats tests/