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: Allow to run steps conditionally @ parallel workflow #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
22 changes: 22 additions & 0 deletions .github/workflows/erlang-parallel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Comment on lines +139 to +140
Copy link
Contributor

@kehitt kehitt Jun 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я предлагаю как минимум повысить до warning или даже error, notice-сообщения какие-то ужасно незаметные получаются.

Как максимум мне вообще не особо нравится, что получить зеленую галочку на pr можно, поменяв какой-то файл, отличный от тех, что под .github (то, чего я хотел избежать, когда выкидывал использование makefile из конфигураций CI). Может добавить какой нибудь параметр сюда, вроде allow-optional-linting/allow-optional-formatting c дефолтом false?

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