Update README.md #12
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
name: GO SonarCloud Workflow | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Compile and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repository | |
uses: actions/checkout@master | |
- name: Setup go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: ^1.13 | |
- run: make test | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v1 | |
with: | |
name: code-coverage-report | |
path: bin | |
sonarCloudTrigger: | |
needs: build | |
name: SonarCloud Trigger | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repository | |
uses: actions/checkout@master | |
- name: Download code coverage results | |
uses: actions/download-artifact@v1 | |
with: | |
name: code-coverage-report | |
path: bin | |
- name: Analyze with SonarCloud | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |