Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/release-please/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
".": {}
},
"extra-files": [
"README.md"
"README.md",
"sonar-project.properties"
]
}
35 changes: 0 additions & 35 deletions .github/workflows/snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,6 @@ on:

jobs:

test:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run tests
run: |
go test \
-race \
-count=1 \
-vet=all \
-timeout 3m \
-coverpkg=./... \
-covermode=atomic \
-coverprofile=coverage.out \
./...
go tool cover \
-html=coverage.out \
-o coverage.html

- name: Upload assets
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.*

build:
runs-on: ubuntu-latest
steps:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: test

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:

test:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run tests
run: |
go test \
-race \
-count=1 \
-vet=all \
-timeout 3m \
-coverpkg=./... \
-covermode=atomic \
-coverprofile=coverage.out \
./...
go tool cover \
-html=coverage.out \
-o coverage.html

- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v5.1.0
env:
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}

- name: Upload assets
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.*
11 changes: 11 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sonar.organization=firebolt-db
sonar.projectKey=firebolt-db_mcp-server
sonar.projectName=firebolt-db/mcp-server
sonar.projectVersion=0.2.0 # x-release-please-version

sonar.sources=.
sonar.exclusions=**/*_test.go,cmd/docs-scrapper/**

sonar.tests=.
sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out