Skip to content

Add nils-cli alias loader under scripts #594

Add nils-cli alias loader under scripts

Add nils-cli alias loader under scripts #594

Workflow file for this run

name: Zsh Checks
on:
push:
branches: [ main ]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
semgrep:
description: Run Semgrep scan (optional)
required: false
default: 'false'
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install zsh (if missing)
run: |
set -euo pipefail
if ! command -v zsh >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y zsh
fi
- name: Enforce typeset empty-string quotes
run: |
set -euo pipefail
zsh -f ./tools/fix-typeset-empty-string-quotes.zsh --check
- name: Enforce typeset initializers
run: |
set -euo pipefail
zsh -f ./tools/fix-typeset-initializers.zsh --check
- name: Run smoke check
run: |
set -euo pipefail
if command -v script >/dev/null 2>&1; then
script -q -e -c 'zsh -f ./tools/check.zsh --smoke' /dev/null
else
zsh -f ./tools/check.zsh --smoke
fi
- name: Run completion checks
run: |
set -euo pipefail
zsh -f ./tools/check-completions.zsh
- name: Run env bool audit
run: |
set -euo pipefail
zsh -f ./tools/audit-env-bools.zsh --check
- name: Run tests
run: |
set -euo pipefail
zsh -f ./tests/run.zsh
- name: Run fzf-def docblock audit
env:
ZSH_CACHE_DIR: cache
run: |
set -euo pipefail
zsh -f ./tools/audit-fzf-def-docblocks.zsh --check --stdout --out "$ZSH_CACHE_DIR/fzf-def-docblocks-audit.txt"
- name: Upload fzf-def docblock audit report
if: always()
uses: actions/upload-artifact@v6
with:
name: fzf-def-docblocks-audit
path: cache/fzf-def-docblocks-audit.txt
if-no-files-found: warn
- name: Install semgrep (optional)
if: ${{ vars.CI_SEMGREP_ENABLED == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.semgrep == 'true') }}
run: |
set -euo pipefail
if ! command -v python3 >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y python3 python3-pip
fi
python3 -m pip install --upgrade pip
python3 -m pip install semgrep
- name: Run semgrep scan (optional)
if: ${{ vars.CI_SEMGREP_ENABLED == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.semgrep == 'true') }}
run: |
set -euo pipefail
zsh -f ./tools/semgrep-scan.zsh --profile local
- name: Upload semgrep report (optional)
if: ${{ always() && (vars.CI_SEMGREP_ENABLED == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.semgrep == 'true')) }}
uses: actions/upload-artifact@v6
with:
name: semgrep-report
path: out/semgrep/*.json
if-no-files-found: warn