Skip to content

Commit

Permalink
Merge pull request #2 from deb-ict/features/code-quality
Browse files Browse the repository at this point in the history
Add code quality & coverage scanner
  • Loading branch information
deborggraever authored Mar 3, 2025
2 parents 5433c2d + fb864dc commit 7437947
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ permissions:
contents: read
pull-requests: write
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
Expand All @@ -24,4 +29,11 @@ jobs:
run: go build ./...

- name: Test
run: go 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 }}

12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# go-xmlenc
XML Encryption

[![Build & Test](https://github.com/deb-ict/go-xmlenc/actions/workflows/build.yml/badge.svg)](https://github.com/deb-ict/go-xmlenc/actions/workflows/build.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=deb-ict_go-xmlenc&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=deb-ict_go-xmlenc)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=deb-ict_go-xmlenc&metric=coverage)](https://sonarcloud.io/summary/new_code?id=deb-ict_go-xmlenc)

XML encryption

## Installation
Install `go-xmlenc` using `go get`:

`go get -u github.com/deb-ict/go-xmlenc`
14 changes: 14 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sonar.projectKey=deb-ict_go-xmlenc
sonar.organization=deb-ict

sonar.projectName=go-xmlenc
sonar.projectVersion=1.0.0

sonar.sources=.
sonar.exclusions=**/*_test.go,**/vendor/**,**/node_modules/**

sonar.tests=.
sonar.test.inclusions=**/*_test.go
sonar.test.exclusions=**/vendor/**
sonar.go.coverage.reportPaths=coverage.out
sonar.go.tests.reportPaths=report.json

0 comments on commit 7437947

Please sign in to comment.