Skip to content

Commit

Permalink
TD-312: Permit some steps to run conditionally (#22)
Browse files Browse the repository at this point in the history
Depending on availability of rebar3 plugins in a project.

* Switch to valitydev/thrift v0.14.2.3
  • Loading branch information
keynslug authored Jun 21, 2022
1 parent 894595a commit 99e6e52
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/erlang-parallel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
thrift-version:
description: 'Thrift (valitydev/thrift) version to use.'
required: false
default: "0.14.2.1"
default: "0.14.2.3"
type: string
# Codegen options
use-swagger-codegen:
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/erlang-simple-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
thrift-version:
description: 'Thrift (valitydev/thrift) version to use.'
required: false
default: "0.14.2.2"
default: "0.14.2.3"
type: string
# Codegen options
use-swagger-codegen:
Expand Down Expand Up @@ -100,10 +100,32 @@ jobs:
restore-keys: |
${{ inputs.cache-version }}-${{ runner.os }}-otp-${{ inputs.otp-version }}-plt-
- 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
Expand Down

0 comments on commit 99e6e52

Please sign in to comment.