Skip to content

Next 240224

Next 240224 #31

Workflow file for this run

---
name: "✅ Zsh"
on:
push:
paths:
- "**/*.zsh"
- "functions/*"
pull_request:
paths:
- "**/*.zsh"
- "functions/*"
workflow_dispatch: {}
jobs:
zsh-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3
- name: "⚡ Set matrix output"
id: set-matrix
run: |
MATRIX="$(find . -type d -name 'doc' -prune -o -type f \( -iname '*.zsh' -o -iname '@zsh-' -o -iname '.zi-' -o -iname '.zsh-' \) -print | jq -ncR '{"include": [{"file": inputs}]}')"
echo "MATRIX=${MATRIX}" >&2
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
zsh-n:
runs-on: ubuntu-latest
needs: zsh-matrix
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.zsh-matrix.outputs.matrix) }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3
- name: "⚡ Install dependencies"
run: sudo apt update && sudo apt-get install -yq zsh
- name: "⚡ zsh -n: ${{ matrix.file }}"
env:
ZSH_FILE: ${{ matrix.file }}
run: |
zsh -n "${ZSH_FILE}"
- name: "⚡ zcompile ${{ matrix.file }}"
env:
ZSH_FILE: ${{ matrix.file }}
run: |
zsh -fc "zcompile ${ZSH_FILE}"; rc=$?
ls -al "${ZSH_FILE}.zwc"; exit "$rc"