From 3141c6b39be23cd58a0623848fdc3e4f893250b6 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 9 Jun 2023 16:49:49 +0300 Subject: [PATCH] .github: add CI job to check RPC bindings can be compiled Signed-off-by: Anna Shaleva --- .../config/.rpcbindings_golangci.yml | 4 ++++ .github/workflows/go.yml | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/config/.rpcbindings_golangci.yml diff --git a/.github/workflows/config/.rpcbindings_golangci.yml b/.github/workflows/config/.rpcbindings_golangci.yml new file mode 100644 index 00000000..f0d46b4d --- /dev/null +++ b/.github/workflows/config/.rpcbindings_golangci.yml @@ -0,0 +1,4 @@ +issues: + exclude-rules: + - linters: + - unused # RPC bindings are allowed to contain some unused convertors. diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e590eecc..6d8ad67f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -54,3 +54,24 @@ jobs: - name: Compile contracts run: make build + + build_bindings: + name: Build RPC bindings + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.18' + + - name: Compile contracts and generate RPC bindings + run: make build + + - name: Run linter on RPC bindings + uses: golangci/golangci-lint-action@v3 + with: + version: latest + args: --config=.github/workflows/config/.rpcbindings_golangci.yml