diff --git a/gitlab-ci.yml b/gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..e17f770c9061b1ae5d857c4d186c1f5b6f369522 --- /dev/null +++ b/gitlab-ci.yml @@ -0,0 +1,30 @@ +image: debian:bullseye-slim + +before_script: + - apt update -y + - apt install -y git make shellcheck golang-go postgresql -y -qq + - export GOPATH="$HOME/go" + - export PATH="$PATH:$GOPATH/bin" + - go get -u github.com/mvdan/sh/cmd/shfmt + +linters: + script: + - make check + +test: + services: + - name: $CI_REGISTRY/dynamicexposure/server-components/containers/docker-obm-database:master + alias: postgres + variables: + POSTGRES_USER: "postgres" + POSTGRES_PASSWORD: "9doij23408usf" + PGPASSWORD: "$POSTGRES_PASSWORD" + + interruptible: true + script: + - | + for file in `ls migrations/*` + do + echo "importing $file" + psql -v ON_ERROR_STOP=1 -h postgres -U postgres -f $file + done