test(gh): Use 2 steps
I prefer to split tests and sonar upload
This commit is contained in:
13
.github/workflows/go-test.yaml
vendored
13
.github/workflows/go-test.yaml
vendored
@@ -12,6 +12,12 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: tests-results
|
||||||
|
path: |
|
||||||
|
coverprofile.out
|
||||||
|
gotest.json
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
@@ -25,6 +31,13 @@ jobs:
|
|||||||
- name: Launch Test
|
- name: Launch Test
|
||||||
run: |
|
run: |
|
||||||
go vet ./... && go test -coverprofile=coverprofile.out -json -v ./... > gotest.json
|
go vet ./... && go test -coverprofile=coverprofile.out -json -v ./... > gotest.json
|
||||||
|
sonar:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: tests
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: tests-results
|
||||||
- name: SonarCloud Scan
|
- name: SonarCloud Scan
|
||||||
uses: SonarSource/sonarcloud-github-action@master
|
uses: SonarSource/sonarcloud-github-action@master
|
||||||
env:
|
env:
|
||||||
|
Reference in New Issue
Block a user