Skip to content

refactor: CI workflows and improve commit-lint setup #50

refactor: CI workflows and improve commit-lint setup

refactor: CI workflows and improve commit-lint setup #50

Workflow file for this run

name: Lint
on:
pull_request:
branches: [main, master]
push:
branches: [main, master]
workflow_call:
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- name: install dependencies
run: brew install shellcheck shfmt zsh uv
- name: run mdformat
run: find . -name '*.md' ! -name 'CHANGELOG.md' -type f -print0 | xargs -0 uvx --with linkify-it-py --with mdformat-config --with mdformat-gfm --with mdformat-shfmt --with mdformat-tables --with mdformat-toc mdformat --check --wrap 120
- name: run shfmt
run: find . -name '*.sh' -type f -print0 | xargs -0 -n1 -P4 shfmt -bn -ci -d -i 2 -ln bash -s -sr
- name: run shellcheck
run: find . -name '*.sh' -type f -print0 | xargs -0 -n1 -P4 shellcheck
- name: run zsh
run: find . -name '*.zsh' -type f -print0 | xargs -0 -n1 -P4 zsh -n
- name: run zcompile
run: find . -name '*.zsh' -type f -exec zsh -fc "zcompile {}" \;