-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from benmatselby/switch-build
Move builds and coverage to GitHub actions and Sonar
- Loading branch information
Showing
5 changed files
with
60 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Go | ||
on: [push] | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.12 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.12 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Get dependencies | ||
run: | | ||
make install | ||
- name: Vet | ||
run: | | ||
make vet | ||
- name: Build | ||
run: | | ||
make build | ||
- name: Test | ||
run: | | ||
make test | ||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
coverage.out | ||
debug.test | ||
vendor/ | ||
|
||
# Sonar | ||
.scannerwork/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
sonar.host.url=https://sonarcloud.io | ||
sonar.organization=benmatselby | ||
sonar.projectKey=go-azuredevops | ||
sonar.projectName=go-azuredevops | ||
|
||
sonar.sources=. | ||
sonar.exclusions=**/*_test.go | ||
|
||
sonar.tests=. | ||
sonar.test.inclusions=**/*_test.go | ||
|
||
sonar.go.tests.reportPaths=coverage.out | ||
sonar.go.coverage.reportPaths=coverage.out |