Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TD-312: Permit some steps to run conditionally #22

Merged
merged 3 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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