Compare commits

..

No commits in common. "f0acfa0bdb5c5a23f7e1e4fe7c5441f9abe52a46" and "49a703643db4c24b47c8d44a86ae67f6e4153d22" have entirely different histories.

3 changed files with 26 additions and 19 deletions

View File

@ -3,8 +3,7 @@ run-name: ${{ gitea.actor }} is testing the build
on:
push:
branches:
- ci/*
- dev/*
- main
pull_request:
branches: [ "main" ]
@ -12,22 +11,29 @@ jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repo
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup Go environment
uses: https://gitea.com/actions/setup-go@v3
uses: https://github.com/actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: false
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
go-version: 1.22.0 # optional
# Path to the go.mod file.
go-version-file: ./go.mod # optional
# Set this option to true if you want the action to always check for the latest available version that satisfies the version spec
check-latest: true # optional
# Used to specify whether caching is needed. Set to true, if you'd like to enable caching.
cache: true # optional
- name: Execute Go Test files with coverage report
run: TESTCONTAINERS_RYUK_DISABLED=true go test -v ./... -json -coverprofile="coverage.out" | tee "test-report.out"
- name: SonarQube
uses: sonarsource/sonarqube-scan-action@master
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectKey=Anthrove---OtterSpace-SDK

View File

@ -33,22 +33,24 @@ package main
import (
"context"
"log"
"fmt"
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/database"
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models"
)
func main() {
ctx := context.Background()
cfg := models.DatabaseConfig{}
pgClient := database.NewPostgresqlConnection()
err := pgClient.Connect(ctx, cfg)
var err error
dbDebug := false
ctx := context.Background()
pgClient := database.NewPostgresqlConnection(dbDebug)
err = pgClient.Connect(ctx, "your-endpoint", "your-username", "your-password", "anthrove", 5432, "disable", "Europe/Berlin")
if err != nil {
log.Panic(err)
fmt.Println(err)
return
}
// further usage of the client...
}
```

View File

@ -1 +0,0 @@
sonar.projectKey=Anthrove---OtterSpace-SDK