diff --git a/.github/workflows/erlang-parallel-build.yml b/.github/workflows/erlang-parallel-build.yml index 8ec0f78..1c83901 100644 --- a/.github/workflows/erlang-parallel-build.yml +++ b/.github/workflows/erlang-parallel-build.yml @@ -130,10 +130,32 @@ jobs: restore-keys: | ${{ inputs.cache-version }}-${{ runner.os }}-otp-${{ inputs.otp-version }}-build- + - name: Check formatting (prereqs) + id: prereq-erlfmt + run: | + if ( rebar3 plugins list | grep 'erlfmt' ) ; then + echo "::set-output name=exists::true" + else + echo "::set-output name=exists::false" + echo "::notice file=rebar.config::Plugin 'erlfmt' is missing, can not check formatting." + fi + - name: Check formatting + if: ${{ steps.prereq-erlfmt.outputs.exists == 'true' }} run: rebar3 fmt -c + - name: Run linting (prereqs) + id: prereq-lint + run: | + if ( rebar3 plugins list | grep 'rebar3_lint' ) ; then + echo "::set-output name=exists::true" + else + echo "::set-output name=exists::false" + echo "::notice file=rebar.config::Plugin 'rebar3_lint' is missing, can not run linting." + fi + - name: Run linting + if: ${{ steps.prereq-lint.outputs.exists == 'true' }} run: rebar3 lint - name: Run xref