From 6d2e30e5bbbadb8d3c53d9249b0e33156a2293cb Mon Sep 17 00:00:00 2001 From: Lennard Brinkhaus Date: Fri, 14 Jun 2024 14:46:52 +0000 Subject: [PATCH] =?UTF-8?q?.gitea/workflow/build=5Fcheck.yaml=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflow/build_check.yaml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflow/build_check.yaml diff --git a/.gitea/workflow/build_check.yaml b/.gitea/workflow/build_check.yaml new file mode 100644 index 0000000..09ddc2c --- /dev/null +++ b/.gitea/workflow/build_check.yaml @@ -0,0 +1,39 @@ +name: Gitea Build Check +run-name: ${{ gitea.actor }} is testing the build +on: + push: + branches: + - main + pull_request: + branches: [ "main" ] + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + + - name: Setup Go environment + uses: https://github.com/actions/setup-go@v3 + with: + # The Go version to download (if necessary) and use. Supports semver spec and ranges. + go-version: 1.22.0 # optional + # Path to the go.mod file. + go-version-file: ./go.mod # optional + # Set this option to true if you want the action to always check for the latest available version that satisfies the version spec + check-latest: true # optional + # Used to specify whether caching is needed. Set to true, if you'd like to enable caching. + cache: true # optional + + - name: Test + run: go test -v ./... -json -coverprofile=coverage.out > test-report.out + + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} + with: + args: > + -Dsonar.projectKey=Anthrove---OtterSpace-SDK \ No newline at end of file