diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 5da12b1..e09c569 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -32,36 +32,14 @@ jobs: - name: Setup asdf uses: asdf-vm/actions/setup@v1 + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + - name: Install bats-core run: brew install bats-core - name: Test plugin run: | - asdf plugin-add dprint $GITHUB_WORKSPACE + asdf plugin-add dprint "$GITHUB_WORKSPACE" make test - - lint: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install ShellCheck - run: brew install shellcheck - - - name: Run ShellCheck - run: make lint - - format: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install shfmt - run: brew install shfmt - - - name: Run shfmt - run: make fmt-check diff --git a/Makefile b/Makefile index c8fe09a..b8a4edc 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ SH_SRCFILES = $(shell git ls-files "bin/*") SHFMT_BASE_FLAGS = -s -i 2 -ci -fmt: +format: shfmt -w $(SHFMT_BASE_FLAGS) $(SH_SRCFILES) .PHONY: fmt -fmt-check: +format-check: shfmt -d $(SHFMT_BASE_FLAGS) $(SH_SRCFILES) .PHONY: fmt-check