From 86b64b751381e668b04af83914d3caa415a4f0b3 Mon Sep 17 00:00:00 2001 From: Yasmin Teles Date: Sun, 17 Mar 2024 09:30:22 -0300 Subject: [PATCH] chore: add schell check at CI --- .github/workflows/health-check.yml | 9 +++++++++ Makefile | 6 +++++- brew/Brewfile | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/health-check.yml b/.github/workflows/health-check.yml index e21016a..d456de8 100644 --- a/.github/workflows/health-check.yml +++ b/.github/workflows/health-check.yml @@ -18,3 +18,12 @@ jobs: uses: gitleaks/gitleaks-action@v2 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + + Shellcheck: + runs-on: ubuntu-latest + steps: + - name: Check out the repository code + uses: actions/checkout@v4 + + - name: Run Shellcheck + run: make check-scripts diff --git a/Makefile b/Makefile index 4135a95..2c1e409 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help del ssh backup +.PHONY: help del ssh backup check-scripts help: ## Show help. @printf "A set of environment management commands.\n" @@ -22,3 +22,7 @@ ssh: ## Copy the SSH public key to your clipboard. backup: ## Back up your applications list. @echo "Backing up your applications list..." @brew bundle dump --file=./brew/Brewfile --force + +check-scripts: ## Check the shell script. + @echo "Checking the shell script..." + @shellcheck *.sh diff --git a/brew/Brewfile b/brew/Brewfile index bb42926..2a5fc53 100644 --- a/brew/Brewfile +++ b/brew/Brewfile @@ -7,6 +7,7 @@ tap "homebrew/services" # Essentials brew "stow" brew "git" +brew "shellcheck" # Terminal brew "spaceship"