Use sonarcloud
This commit is contained in:
10
.github/workflows/go-test.yaml
vendored
10
.github/workflows/go-test.yaml
vendored
@@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user