Initial commit
CI / test (push) Canceled after 0s

This commit is contained in:
2026-09-12 22:22:17 +02:00
commit 904d14b64c
314 changed files with 31884 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
## Änderung
<!-- Was wurde geändert und welches Problem wird damit gelöst? -->
## Prüfung
<!-- Welche automatisierten und manuellen Prüfungen wurden ausgeführt? -->
- [ ] Betroffene Tests wurden ergänzt oder der Verzicht wurde begründet.
- [ ] `go test ./...` wurde ausgeführt oder ein Fehlschlag wurde dokumentiert.
- [ ] Dokumentation und Konfigurationsbeispiele wurden bei Bedarf aktualisiert.
- [ ] Der Beitrag enthält kein undeklariertes Fremdmaterial und keine Geheimnisse.
## Contributor License Agreement
- [ ] **I have read and agree to the Gardomatic Contributor License Agreement,
Version 1.0 (`CLA.md`), and I have the authority to grant the rights stated
in it for this contribution.**
<!--
Die beitragende Person muss diese Checkbox selbst markieren. Beiträge im Namen
eines Unternehmens oder einer Organisation vorab mit alex@kleiax.de abstimmen.
-->
+44
View File
@@ -0,0 +1,44 @@
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: gardomatic
POSTGRES_USER: gardomatic
POSTGRES_PASSWORD: gardomatic
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U gardomatic"
--health-interval 2s
--health-timeout 5s
--health-retries 15
env:
GARDOMATIC_DB_DSN: postgres://gardomatic:gardomatic@localhost:5432/gardomatic?sslmode=disable
GARDOMATIC_TEST_DB_DSN: postgres://gardomatic:gardomatic@localhost:5432/gardomatic?sslmode=disable
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Install migrate
run: go install -tags postgres github.com/golang-migrate/migrate/v4/cmd/migrate@latest
- name: Migrate database
run: migrate -path ./internal/storage/postgres/migrations -database "$GARDOMATIC_DB_DSN" up
- name: Verify module and source
run: |
go mod tidy -diff
go vet ./...
- name: Test with race detector
run: go test -race -count=1 ./...
- name: Build all binaries
run: make build/all
+22
View File
@@ -0,0 +1,22 @@
name: CLA
on:
pull_request:
types: [opened, edited, reopened, synchronize]
permissions: {}
jobs:
acceptance:
name: Verify CLA acceptance
runs-on: ubuntu-latest
steps:
- name: Check pull request declaration
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: |
declaration='^- \[[xX]\] \*\*I have read and agree to the Gardomatic Contributor License Agreement,'
if ! grep -Eq "$declaration" <<< "$PR_BODY"; then
echo "The pull request author must accept CLA.md using the checkbox in the pull request template."
exit 1
fi