File tree Expand file tree Collapse file tree 4 files changed +62
-2
lines changed Expand file tree Collapse file tree 4 files changed +62
-2
lines changed Original file line number Diff line number Diff line change
1
+ # based on https://github.com/marco-m/timeit/blob/master/.github/workflows/ci.yml
2
+
3
+ on : [push]
4
+ name : CI
5
+ jobs :
6
+ all :
7
+ strategy :
8
+ matrix :
9
+ go-version : [1.17.x]
10
+ os : [ubuntu-latest]
11
+ task-version : [v3.7.0]
12
+ gotestsum-version : [v1.7.0]
13
+ runs-on : ${{ matrix.os }}
14
+ steps :
15
+ - name : Install Go ${{ matrix.go-version }}
16
+ uses : actions/setup-go@v2
17
+ with :
18
+ go-version : ${{ matrix.go-version }}
19
+ - name : Install task ${{ matrix.task-version }}
20
+ run : go install github.com/go-task/task/v3/cmd/task@${{ matrix.task-version }}
21
+ - name : Install gotestsum ${{ matrix.gotestsum-version }}
22
+ run : go install gotest.tools/gotestsum@${{ matrix.gotestsum-version }}
23
+ - name : Checkout code
24
+ uses : actions/checkout@v2
25
+ with :
26
+ # By default, actions/checkout will persist the GITHUB_TOKEN, so that further
27
+ # steps in the job can perform authenticated git commands (that is: WRITE to
28
+ # the repo). Following the Principle of least privilege, we disable this as long
29
+ # as we don't need it.
30
+ persist-credentials : false
31
+ - name : Go lint
32
+ run : task lint
33
+ - name : Terravalet tests
34
+ run : task test
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
16
16
### Changes
17
17
18
- - Bump go to latest v1.16
18
+ - Bump go to latest v1.17
19
19
20
20
## [ v0.6.0] - (2021-08-11)
21
21
Original file line number Diff line number Diff line change 7
7
8
8
default :
9
9
deps : [test]
10
+
11
+ install-deps :
12
+ desc : Install tool dependencies.
13
+ deps :
14
+ - install-lint
15
+
16
+ lint :
17
+ desc : Lint Terravalet
18
+ deps :
19
+ - install-deps
20
+ cmds :
21
+ # --enable actually adds to the default linters
22
+ - golangci-lint run --enable gofmt,gocritic ./...
10
23
11
24
build :
12
25
desc : Build the terravalet executable
@@ -99,3 +112,16 @@ tasks:
99
112
GOOS : darwin
100
113
GOARCH : amd64
101
114
vars : *build-vars
115
+
116
+ install-lint :
117
+ desc : low-level for CI optimization only
118
+ dir : /tmp
119
+ cmds :
120
+ - curl -L {{.GOLANGCI_URL}} -o golangci-lint.tar.gz
121
+ - tar xzf golangci-lint.tar.gz
122
+ - cp golangci-lint-{{.GOLANGCI_VERSION}}-linux-amd64/golangci-lint {{.BINDIR}}/golangci-lint
123
+ - rm -r golangci-lint*
124
+ vars :
125
+ GOLANGCI_VERSION : 1.42.0
126
+ BINDIR : ' {{default (print .HOME "/go") .GOPATH}}/bin'
127
+ GOLANGCI_URL : https://github.com/golangci/golangci-lint/releases/download/v{{.GOLANGCI_VERSION}}/golangci-lint-{{.GOLANGCI_VERSION}}-{{OS}}-{{ARCH}}.tar.gz
Original file line number Diff line number Diff line change 1
1
module github.com/pix4d/terravalet
2
2
3
- go 1.16
3
+ go 1.17
4
4
5
5
require (
6
6
github.com/dexyk/stringosim v0.0.0-20170922105913-9d0b3e91a842
You can’t perform that action at this time.
0 commit comments