From 4aa409e15976671d0a8960bc3131b9f0fe011a5a Mon Sep 17 00:00:00 2001 From: = Date: Mon, 3 Jan 2022 19:41:01 +0100 Subject: [PATCH 1/5] Add CI --- .woodpecker.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..2ebaf3a --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,6 @@ +pipeline: + build: + image: golang + commands: + - go build + - go test From a171fea9f2f68fc8a70508da58fe03ea012fd8ef Mon Sep 17 00:00:00 2001 From: = Date: Mon, 3 Jan 2022 19:43:36 +0100 Subject: [PATCH 2/5] Update build step --- .woodpecker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2ebaf3a..c980add 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,5 +2,5 @@ pipeline: build: image: golang commands: - - go build - - go test + - go build main.go + - go test -v ./... From e755d02880991036b57880f0c1d144ac43fb474b Mon Sep 17 00:00:00 2001 From: = Date: Mon, 3 Jan 2022 19:46:49 +0100 Subject: [PATCH 3/5] Add condition for CI --- .woodpecker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index c980add..c373f59 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -4,3 +4,5 @@ pipeline: commands: - go build main.go - go test -v ./... + when: + event: [push, pull_request, tag, deployment] From 909435ff14a77d0736513db1749ea479b3164836 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 3 Jan 2022 19:59:20 +0100 Subject: [PATCH 4/5] Add branch filter to build --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index c373f59..ea82db2 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -5,4 +5,5 @@ pipeline: - go build main.go - go test -v ./... when: + branch: master event: [push, pull_request, tag, deployment] From 9631e0103d3f9872892ad22a100eb5cae298e929 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 3 Jan 2022 20:12:10 +0100 Subject: [PATCH 5/5] Build using multiple go versions --- .woodpecker.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index ea82db2..6a2510e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,9 +1,15 @@ pipeline: build: - image: golang + image: golang:${GO_VERSION} commands: - go build main.go - go test -v ./... when: branch: master event: [push, pull_request, tag, deployment] + +matrix: + GO_VERSION: + - "1.17" + - "1.16" + - "latest"