Compare commits

...

7 Commits

Author SHA1 Message Date
f0acfa0bdb Merge branch 'main' into ci/gitea
All checks were successful
Gitea Build Check / Build (push) Successful in 5m15s
Gitea Build Check / Build (pull_request) Successful in 5m13s
2024-07-19 13:02:00 +00:00
652b2ea716 docs: updated readme
Some checks failed
Gitea Build Check / Build (push) Has been cancelled
Gitea Build Check / Build (pull_request) Failing after 28s
2024-07-19 14:54:30 +02:00
91da9b7035 ci: removed branch main and added dev
Some checks failed
Gitea Build Check / Build (push) Has been cancelled
2024-07-19 14:45:52 +02:00
92cf00d83a ci: renamed build steps
Some checks failed
Gitea Build Check / Build (push) Has been cancelled
2024-07-19 14:40:20 +02:00
10aaf14a34 ci: disable cache
All checks were successful
Gitea Build Check / Build (push) Successful in 6m5s
2024-07-19 14:29:05 +02:00
8fe87e12df ci: added ci branch for trigger
Some checks failed
Gitea Build Check / Build (push) Failing after 4m40s
2024-07-19 14:13:31 +02:00
0500e43c37 ci: fixed some things 2024-07-19 14:13:07 +02:00
3 changed files with 19 additions and 26 deletions

View File

@ -3,7 +3,8 @@ run-name: ${{ gitea.actor }} is testing the build
on:
push:
branches:
- main
- ci/*
- dev/*
pull_request:
branches: [ "main" ]
@ -11,29 +12,22 @@ jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout Git Repo
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://github.com/actions/setup-go@v5
uses: https://gitea.com/actions/setup-go@v3
with:
# 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
go-version-file: 'go.mod'
cache: false
- name: Execute Go Test files with coverage report
run: TESTCONTAINERS_RYUK_DISABLED=true go test -v ./... -json -coverprofile="coverage.out" | tee "test-report.out"
- uses: sonarsource/sonarqube-scan-action@master
- name: SonarQube
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectKey=Anthrove---OtterSpace-SDK

View File

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

1
sonar-project.properties Normal file
View File

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