[Snyk] Security upgrade golang from 1.21.8-alpine to 1.22.7-alpine #168
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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
sonarcloud: | |
name: SonarCloud | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup golang | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.16.5' | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Get dependencies | |
run: | | |
cd ./services && go mod tidy | |
- name: Go Run Test | |
run: | | |
cd ./services && go test "./..." -coverprofile="coverage.out" -covermode=count -json > report.json | |
- name: fix code coverage paths | |
working-directory: ./services | |
run: | | |
pwd | |
ls -la | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
with: | |
projectBaseDir: ./services | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |