Skip to content

Commit 73d7b1c

Browse files
committed
Enable make ci (#19)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 46d5ae8 commit 73d7b1c

File tree

4 files changed

+11
-48
lines changed

4 files changed

+11
-48
lines changed

.github/workflows/go.yml renamed to .github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
name: Go
1+
name: CI
22

33
on:
44
push:
55
branches-ignore:
66
- 'release-*'
77
tags-ignore:
88
- '*.*'
9-
- '*.*.*'
109

1110
jobs:
1211

@@ -27,9 +26,14 @@ jobs:
2726
- name: Available platforms
2827
run: echo ${{ steps.buildx.outputs.platforms }}
2928

29+
- name: Run checks
30+
run: make ci
31+
3032
- name: Build
3133
env:
32-
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
34+
REGISTRY: appscodeci
35+
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
36+
USERNAME: 1gtm
3337
run: |
34-
docker login docker.pkg.github.com --username stashed --password ${DOCKER_TOKEN}
35-
make push REGISTRY=docker.pkg.github.com/stashed/postgres
38+
docker login --username ${USERNAME} --password ${DOCKER_TOKEN}
39+
make push

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ TAG := $(VERSION)_$(OS)_$(ARCH)
6969
TAG_PROD := $(TAG)
7070
TAG_DBG := $(VERSION)-dbg_$(OS)_$(ARCH)
7171

72-
GO_VERSION ?= 1.12.10
72+
GO_VERSION ?= 1.12.12
7373
BUILD_IMAGE ?= appscode/golang-dev:$(GO_VERSION)-stretch
7474

7575
OUTBIN = bin/$(OS)_$(ARCH)/$(BIN)
@@ -273,7 +273,7 @@ lint: $(BUILD_DIRS)
273273
--env GO111MODULE=on \
274274
--env GOFLAGS="-mod=vendor" \
275275
$(BUILD_IMAGE) \
276-
golangci-lint run --enable $(ADDTL_LINTERS)
276+
golangci-lint run --enable $(ADDTL_LINTERS) --deadline=10m --skip-files="generated.*\.go$\" --skip-dirs-use-default --skip-dirs=client,vendor
277277

278278
$(BUILD_DIRS):
279279
@mkdir -p $@

hack/test.sh

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,3 @@ TARGETS=$(for d in "$@"; do echo ./$d/...; done)
2626
echo "Running tests:"
2727
go test -installsuffix "static" ${TARGETS}
2828
echo
29-
30-
echo -n "Checking gofmt: "
31-
ERRS=$(find "$@" -type f -name \*.go | xargs gofmt -l 2>&1 || true)
32-
if [ -n "${ERRS}" ]; then
33-
echo "FAIL - the following files need to be gofmt'ed:"
34-
for e in ${ERRS}; do
35-
echo " $e"
36-
done
37-
echo
38-
exit 1
39-
fi
40-
echo "PASS"
41-
echo
42-
43-
echo -n "Checking go vet: "
44-
ERRS=$(go vet ${TARGETS} 2>&1 || true)
45-
if [ -n "${ERRS}" ]; then
46-
echo "FAIL"
47-
echo "${ERRS}"
48-
echo
49-
exit 1
50-
fi
51-
echo "PASS"
52-
echo

0 commit comments

Comments
 (0)