From 1037d6cd0a8dd01a8904d56f58d987584a234b6e Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Aug 2022 20:10:51 +0100 Subject: [PATCH] Add SonarQube --- .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ sonar-project.properties | 6 ++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4cc334e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Test +on: + pull-request: + push: + branches: [ main ] +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Create golangci-lint report + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.1 + cd go + /home/runner/go/bin/golangci-lint run --out-format checkstyle -D deadcode,unused --build-tags=integration --timeout 10m --issues-exit-code 0 ./... > ../report.xml + cd .. + sed -i 's+