Use sonarcloud

This commit is contained in:
2024-04-24 13:48:01 +02:00
parent e0c18ec2ad
commit 531756d8ea

View File

@@ -7,6 +7,7 @@ on:
push: push:
branches: branches:
- master - master
- develop
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -23,12 +24,17 @@ jobs:
./get_helm.sh ./get_helm.sh
- name: Launch Test - name: Launch Test
run: | run: |
go vet ./... && go test -coverprofile=coverout.out -v ./... go vet ./... && go test -coverprofile=coverprofile.out -json -v ./... > gotest.json
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1 uses: codecov/codecov-action@v4.0.1
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
slug: metal3d/katenary slug: metal3d/katenary
file: ./coverout.out file: ./coverprofile.out
fail_ci_if_error: true fail_ci_if_error: true