You've already forked db-wait
Compare commits
13 Commits
v0.2.1
...
cc0f734eee
Author | SHA1 | Date | |
---|---|---|---|
cc0f734eee
|
|||
2ba7bd6e58
|
|||
01a7fd3e34
|
|||
a39352bc21 | |||
6ff83fc26b
|
|||
59468c80f6 | |||
328b399bf6
|
|||
3959a5abfb
|
|||
47fdee3e20
|
|||
81610dc20d
|
|||
bdf8f98b9a
|
|||
81c80aaf05
|
|||
2faae1a8b3
|
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
db-wait
|
10
.gitattributes
vendored
10
.gitattributes
vendored
@ -1,10 +0,0 @@
|
|||||||
# checkout alls text files with end of line = line feed
|
|
||||||
* text eol=lf
|
|
||||||
|
|
||||||
# Binary files should be checked in and out as binary
|
|
||||||
*.png binary
|
|
||||||
*.jpg binary
|
|
||||||
*.eot binary
|
|
||||||
*.ttf binary
|
|
||||||
*.pkcs8 binary
|
|
||||||
*.pkcs12 binary
|
|
29
.gitea/workflows/golang-linters.yaml
Normal file
29
.gitea/workflows/golang-linters.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: "Lint Golang files"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [ "opened", "reopened", "synchronize" ]
|
||||||
|
push:
|
||||||
|
branches: [ '**' ]
|
||||||
|
tags-ignore: [ '**' ]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
golangci:
|
||||||
|
name: "Run golang CI linter"
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go: [ stable ]
|
||||||
|
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4.3.0
|
||||||
|
- uses: actions/setup-go@v5.5.0
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
- uses: golangci/golangci-lint-action@v8.0.0
|
||||||
|
with:
|
||||||
|
version: v2.3.1 # renovate: datasource=github-releases depName=golangci/golangci-lint
|
@ -1,4 +1,4 @@
|
|||||||
name: Golang Tests
|
name: "Run Golang tests"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -6,16 +6,37 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ '**' ]
|
branches: [ '**' ]
|
||||||
tags-ignore: [ '**' ]
|
tags-ignore: [ '**' ]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
unittest:
|
# integration-test:
|
||||||
runs-on:
|
# name: "Run integration tests"
|
||||||
- ubuntu-latest
|
# runs-on: ${{ matrix.os }}
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# go: [ stable ]
|
||||||
|
# os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v4.3.0
|
||||||
|
# - uses: actions/setup-go@v5.5.0
|
||||||
|
# with:
|
||||||
|
# go-version: ${{ matrix.go }}
|
||||||
|
# - env:
|
||||||
|
# GOPROXY: ${{ vars.GOPROXY }}
|
||||||
|
# run: make test/integration
|
||||||
|
|
||||||
|
unit-test:
|
||||||
|
name: "Run unit tests"
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go: [ stable ]
|
||||||
|
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v4.3.0
|
||||||
- uses: actions/setup-go@v5.5.0
|
- uses: actions/setup-go@v5.5.0
|
||||||
with:
|
with:
|
||||||
go-version: stable
|
go-version: ${{ matrix.go }}
|
||||||
- env:
|
- env:
|
||||||
GOPROXY: ${{ vars.GOPROXY }}
|
GOPROXY: ${{ vars.GOPROXY }}
|
||||||
run: make test/unit
|
run: make test/unit
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
name: Markdown linter
|
name: "Lint Markdown files"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [ "opened", "reopened", "synchronize" ]
|
types: [ "opened", "reopened", "synchronize" ]
|
||||||
push:
|
push:
|
||||||
branches: [ '**' ]
|
branches: [ '*' ]
|
||||||
tags-ignore: [ '**' ]
|
tags-ignore: [ '*' ]
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
markdown-lint:
|
markdown-lint:
|
||||||
container:
|
name: "Run markdown linter"
|
||||||
image: git.cryptic.systems/volker.raschek/markdownlint:0.45.0
|
runs-on: ubuntu-latest
|
||||||
runs-on:
|
|
||||||
- ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v4.3.0
|
||||||
- name: Lint Markdown files
|
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
|
||||||
run: markdownlint --config .markdownlint.yaml .
|
with:
|
||||||
|
globs: '**/*.md'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: Release
|
name: "Release"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -9,15 +9,15 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on:
|
name: "Release application"
|
||||||
- ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v4.3.0
|
||||||
- uses: docker/setup-qemu-action@v3.6.0
|
- uses: docker/setup-qemu-action@v3.6.0
|
||||||
- uses: actions/setup-go@v5.5.0
|
- uses: actions/setup-go@v5.5.0
|
||||||
with:
|
with:
|
||||||
go-version: stable
|
go-version: stable
|
||||||
- uses: docker/login-action@v3.4.0
|
- uses: docker/login-action@v3.5.0
|
||||||
with:
|
with:
|
||||||
registry: git.cryptic.systems
|
registry: git.cryptic.systems
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
@ -28,7 +28,7 @@ jobs:
|
|||||||
GOPROXY: ${{ vars.GOPROXY }}
|
GOPROXY: ${{ vars.GOPROXY }}
|
||||||
uses: goreleaser/goreleaser-action@v6.3.0
|
uses: goreleaser/goreleaser-action@v6.3.0
|
||||||
with:
|
with:
|
||||||
version: "~> v2"
|
version: v2.11.2 # renovate: datasource=github-releases depName=goreleaser/goreleaser
|
||||||
args: release --clean
|
args: release --clean
|
||||||
|
|
||||||
sync-to-hub-docker-io:
|
sync-to-hub-docker-io:
|
||||||
|
@ -4,16 +4,17 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ 'master' ]
|
branches: [ 'master' ]
|
||||||
paths: [ 'README.md' ]
|
paths: [ 'README.md' ]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-description-on-hub-docker-io:
|
update-description-on-hub-docker-io:
|
||||||
runs-on:
|
runs-on:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v4.3.0
|
||||||
- uses: peter-evans/dockerhub-description@v4.0.2
|
- uses: peter-evans/dockerhub-description@v4.0.2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_IO_PASSWORD }}
|
password: ${{ secrets.DOCKER_IO_PASSWORD }}
|
||||||
repository: volkerraschek/dcmerge
|
repository: volkerraschek/db-wait
|
||||||
readme-filepath: README.md
|
readme-filepath: README.md
|
13
.golangci.yaml
Normal file
13
.golangci.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
version: "2"
|
||||||
|
linters:
|
||||||
|
default: standard
|
||||||
|
enable:
|
||||||
|
- errname
|
||||||
|
- gosec
|
||||||
|
|
||||||
|
exclusions:
|
||||||
|
rules: []
|
||||||
|
warn-unused: true
|
||||||
|
|
||||||
|
run:
|
||||||
|
tests: true
|
2
go.mod
2
go.mod
@ -4,7 +4,7 @@ go 1.24
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/lib/pq v1.10.9
|
github.com/lib/pq v1.10.9
|
||||||
github.com/sijms/go-ora/v2 v2.8.24
|
github.com/sijms/go-ora/v2 v2.9.0
|
||||||
github.com/spf13/cobra v1.9.1
|
github.com/spf13/cobra v1.9.1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
4
go.sum
4
go.sum
@ -4,8 +4,8 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf
|
|||||||
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
|
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
|
||||||
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/sijms/go-ora/v2 v2.8.24 h1:TODRWjWGwJ1VlBOhbTLat+diTYe8HXq2soJeB+HMjnw=
|
github.com/sijms/go-ora/v2 v2.9.0 h1:+iQbUeTeCOFMb5BsOMgUhV8KWyrv9yjKpcK4x7+MFrg=
|
||||||
github.com/sijms/go-ora/v2 v2.8.24/go.mod h1:QgFInVi3ZWyqAiJwzBQA+nbKYKH77tdp1PYoCqhR2dU=
|
github.com/sijms/go-ora/v2 v2.9.0/go.mod h1:QgFInVi3ZWyqAiJwzBQA+nbKYKH77tdp1PYoCqhR2dU=
|
||||||
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
|
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
|
||||||
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
|
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
|
||||||
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
||||||
|
@ -64,8 +64,8 @@ LOOP:
|
|||||||
case "postgres":
|
case "postgres":
|
||||||
row := sqlDB.QueryRowContext(queryCtx, "SELECT 1 AS ROW")
|
row := sqlDB.QueryRowContext(queryCtx, "SELECT 1 AS ROW")
|
||||||
err := row.Err()
|
err := row.Err()
|
||||||
switch {
|
switch err {
|
||||||
case err == nil:
|
case nil:
|
||||||
return nil
|
return nil
|
||||||
default:
|
default:
|
||||||
fmt.Fprintf(os.Stderr, "%s: %s\n", time.Now().String(), err.Error())
|
fmt.Fprintf(os.Stderr, "%s: %s\n", time.Now().String(), err.Error())
|
||||||
|
Reference in New Issue
Block a user