Skip to content

Add code quality & coverage scanner #10

Add code quality & coverage scanner

Add code quality & coverage scanner #10

Workflow file for this run

name: Build & Test
permissions:
contents: read
pull-requests: write
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true
- name: Build
run: go build ./...
- name: Test
run: go test -json -cover -coverprofile=coverage.out -covermode=atomic -v ./... > report.json
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v5.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}