All checks were successful
SonarQube Scan / SonarQube Analysis (push) Successful in 1m26s
32 lines
672 B
YAML
32 lines
672 B
YAML
name: SonarQube Scan
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
sonarqube:
|
|
name: SonarQube Analysis
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.23'
|
|
cache: true
|
|
|
|
- name: Run tests with coverage
|
|
run: go test -v -coverprofile=coverage.out ./src
|
|
|
|
- name: Run SonarQube scanner
|
|
uses: SonarSource/sonarqube-scan-action@v7.1.0
|
|
env:
|
|
SONAR_HOST_URL: ${{ vars.SONAR_URL }}
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|