From add02385c9c48e7a3d9405b8023e72611e6d5a8f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 3 Apr 2021 15:06:54 +0200 Subject: [PATCH] Add .gitlab-ci.yml --- .gitlab-ci.yml | 15 +++++++++++++++ ci/run | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100755 ci/run diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..10f9811 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,15 @@ +.template-docker: &template-docker + before_script: + - apt-get update + - apt-get install --no-install-recommends --yes build-essential ca-certificates git golang golang-1.16 golang-golang-x-tools make + script: + # NOTE: golang is still using golang-1.15 + - mkdir -p $HOME/go/bin + - ln -sf /usr/lib/go-1.16/bin/go $HOME/go/bin + - ln -sf /usr/lib/go-1.16/bin/gofmt $HOME/go/bin + # + - ./ci/run + +debian-sid: + <<: *template-docker + image: debian:sid diff --git a/ci/run b/ci/run new file mode 100755 index 0000000..7ec5f16 --- /dev/null +++ b/ci/run @@ -0,0 +1,15 @@ +#!/bin/sh + +set -eu +set -x + + +PATH=$HOME/go/bin:$PATH +export PATH + +make +go test -race ./... + +# Additional static checks only run in CI +go get honnef.co/go/tools/cmd/staticcheck +staticcheck ./... -- 2.45.2