diff --git a/.ci/check_linting.sh b/.ci/check_linting.sh deleted file mode 100755 index 311d52b..0000000 --- a/.ci/check_linting.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -echo "### Running gofmt..." -files="$(gofmt -l .)" - -if [ ! -z "$files" ]; then - # run gofmt to print out the diff of what needs to be changed - gofmt -d -e . - exit 1 -fi - -echo "### Running staticcheck..." -staticcheck ./... diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1dee340..0e35c82 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,25 +24,13 @@ stages: - merge_requests - tags -# device documentation -gofmt linting: - stage: lint - allow_failure: true - <<: *only-default - before_script: - # specific mirror used because staticcheck hasn't made it to the other mirrors yet... - - apk -q update --repository http://dl-4.alpinelinux.org/alpine/edge/testing - - apk -q add --repository http://dl-4.alpinelinux.org/alpine/edge/testing go staticcheck - script: - - .ci/check_linting.sh - build: stage: build <<: *only-default before_script: - - apk -q add go + - apk -q add go staticcheck make script: - - go build -v - - go test ./... + - make test + - make artifacts: expire_in: 1 week