Add CI and SonarQube workflows for automated testing and code quality analysis
SonarQube Scan / SonarQube Analysis (push) Failing after 1m13s
SonarQube Scan / SonarQube Analysis (push) Failing after 1m13s
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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: ${{ secrets.SONAR_URL }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
Reference in New Issue
Block a user