From 167406bc68b5815e705401882445bd2ba2ee5631 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 14 Oct 2021 17:23:19 +0100 Subject: [PATCH] build: switch to using the golangci-lint action for better error reporting The action reports errors to users in their pull requests which is much easier to understand. --- .github/workflows/build.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 918452f7f..b52bc7fb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -203,13 +203,6 @@ jobs: librclone/python/test_rclone.py if: matrix.librclonetest - - name: Code quality test - shell: bash - run: | - make build_dep - make check - if: matrix.check - - name: Compile all architectures test shell: bash run: | @@ -229,6 +222,22 @@ jobs: # Deploy binaries if enabled in config && not a PR && not a fork if: matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone' + lint: + if: ${{ github.repository == 'rclone/rclone' || github.event.inputs.manual }} + timeout-minutes: 30 + name: "lint" + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Code quality test + uses: golangci/golangci-lint-action@v2 + with: + # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version + version: latest + android: if: ${{ github.repository == 'rclone/rclone' || github.event.inputs.manual }} timeout-minutes: 30