[PF-2](deps): Bump SonarSource/sonarcloud-github-action #15
Workflow file for this run
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 library | |
on: [push] | |
concurrency: | |
# Grouped by ref (branch/tag name) not to cancel other jobs running for other feature branches | |
group: lib_${{ github.ref }} | |
# > cancel any currently running job or workflow in the same concurrency group | |
# in case of multiple pushes to the same branch, we just need the latest, so cancel all previous | |
cancel-in-progress: true | |
env: | |
go-version: 1.22 | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go ${{ env.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.go-version }} | |
cache: true | |
- name: Build Go ${{ env.go-version }} | |
run: go build ./... | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
args: --timeout=3m --modules-download-mode=readonly --go ${{ env.go-version }} | |
skip-cache: true | |
- name: build | |
run: make build | |
- name: test | |
run: make test | |
- name: run | |
run: make run | |
- name: SonarCloud Scan | |
uses: SonarSource/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |