From 73914b08f5cb3e6c1a00b947f85b7ff3f775b3f4 Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Tue, 21 Jun 2022 19:28:08 +0300 Subject: [PATCH 1/3] Switch to valitydev/thrift v0.14.2.3 --- .github/workflows/erlang-parallel-build.yml | 2 +- .github/workflows/erlang-simple-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/erlang-parallel-build.yml b/.github/workflows/erlang-parallel-build.yml index 8ec0f78..625af99 100644 --- a/.github/workflows/erlang-parallel-build.yml +++ b/.github/workflows/erlang-parallel-build.yml @@ -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: diff --git a/.github/workflows/erlang-simple-build.yml b/.github/workflows/erlang-simple-build.yml index f0f36b2..208d481 100644 --- a/.github/workflows/erlang-simple-build.yml +++ b/.github/workflows/erlang-simple-build.yml @@ -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: From 90fb866254358af5b3037d7a912a7b212d2b3d9b Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Tue, 21 Jun 2022 19:50:36 +0300 Subject: [PATCH 2/3] Permit some steps to run conditionally Depending on availability of rebar3 plugins in a project. --- .github/workflows/erlang-simple-build.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/erlang-simple-build.yml b/.github/workflows/erlang-simple-build.yml index 208d481..8c5fd4a 100644 --- a/.github/workflows/erlang-simple-build.yml +++ b/.github/workflows/erlang-simple-build.yml @@ -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 From e34c6ce0b83099c100b91c3f389fdc6e46a66a5b Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Tue, 21 Jun 2022 19:54:45 +0300 Subject: [PATCH 3/3] Fix strings quoting --- .github/workflows/erlang-simple-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/erlang-simple-build.yml b/.github/workflows/erlang-simple-build.yml index 8c5fd4a..86fa07d 100644 --- a/.github/workflows/erlang-simple-build.yml +++ b/.github/workflows/erlang-simple-build.yml @@ -111,7 +111,7 @@ jobs: fi - name: Check formatting - if: ${{ steps.prereq-erlfmt.outputs.exists == "true" }} + if: ${{ steps.prereq-erlfmt.outputs.exists == 'true' }} run: rebar3 fmt -c - name: Run linting (prereqs) @@ -125,7 +125,7 @@ jobs: fi - name: Run linting - if: ${{ steps.prereq-lint.outputs.exists == "true" }} + if: ${{ steps.prereq-lint.outputs.exists == 'true' }} run: rebar3 lint - name: Run xref