From 40d04b620eade0d815b9e6879199c072caee8405 Mon Sep 17 00:00:00 2001 From: William Yang Date: Tue, 19 Dec 2023 09:46:09 +0100 Subject: [PATCH] ci: rebar3 fmt --- .github/workflows/code-format.yaml | 13 ------------- .github/workflows/main.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 13 deletions(-) delete mode 100644 .github/workflows/code-format.yaml diff --git a/.github/workflows/code-format.yaml b/.github/workflows/code-format.yaml deleted file mode 100644 index a789c389..00000000 --- a/.github/workflows/code-format.yaml +++ /dev/null @@ -1,13 +0,0 @@ -name: clang-format Check -on: [push, pull_request] -jobs: - formatting-check: - name: Formatting Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Run clang-format style check for C/C++/Protobuf programs. - uses: jidicula/clang-format-action@v4.11.0 - with: - clang-format-version: '13' - check-path: 'c_src' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 36b39e6c..4a81fe07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,8 +2,28 @@ name: ci on: [push, pull_request] jobs: + formatting-check: + name: Formatting Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run clang-format style check for C/C++/Protobuf programs. + uses: jidicula/clang-format-action@v4.11.0 + with: + clang-format-version: '13' + check-path: 'c_src' + - name: Prepare OTP and rebar3 + uses: erlef/setup-beam@v1 + with: + otp-version: 26 + rebar3-version: 3.20.0 + - name: Run erlfmt for erlang code + run: | + rebar3 fmt -c + mac: timeout-minutes: 60 + needs: formatting-check strategy: fail-fast: false matrix: @@ -58,6 +78,7 @@ jobs: linux: + needs: formatting-check runs-on: ubuntu-22.04 timeout-minutes: 25 strategy: