Skip to content

Commit 59bc5d6

Browse files
committed
- [+] using go module
1 parent 22cf6a2 commit 59bc5d6

File tree

3 files changed

+35
-12
lines changed

3 files changed

+35
-12
lines changed

.github/workflows/go-release-build.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ on:
66
- 'master'
77
tags:
88
- 'v*'
9-
10-
env:
11-
GO111MODULE: off
9+
pull_request:
1210

1311
jobs:
1412
build:
1513
runs-on: ubuntu-latest
1614
steps:
15+
-
16+
name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
1720
-
1821
name: Set up Go
1922
uses: actions/setup-go@v2
@@ -27,20 +30,19 @@ jobs:
2730
# See https://help.cloudsmith.io/docs/cli
2831

2932
-
30-
name: Checkout
31-
uses: actions/checkout@v2
33+
name: Cache Go modules
34+
uses: actions/cache@v1
35+
# Do before go get
3236
with:
33-
fetch-depth: 0
37+
path: ~/go/pkg/mod
38+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
39+
restore-keys: |
40+
${{ runner.os }}-go-
3441
3542
-
3643
name: Tests
3744
run: |
38-
export GOPATH=/home/runner/go
39-
mkdir -p $GOPATH/src/github.com/$GITHUB_ACTOR
40-
mv $GITHUB_WORKSPACE $GOPATH/src/github.com/$GITHUB_ACTOR
41-
ln -s $GOPATH/src/github.com/$GITHUB_REPOSITORY $GITHUB_WORKSPACE
42-
# go mod tidy
43-
go get -v ./...
45+
go mod tidy
4446
go test -v ./...
4547
4648
-

go.mod

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module github.com/go-easygen/emd
2+
3+
go 1.16
4+
5+
require (
6+
github.com/mh-cbon/emd v1.0.1
7+
gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e
8+
)
9+
10+
require gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect

go.sum

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
2+
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
3+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
4+
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
5+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
6+
github.com/mh-cbon/emd v1.0.1 h1:9iHh58d2ggs9wd5fIgkM73e/7VHJtUsfz9i+giQUojQ=
7+
github.com/mh-cbon/emd v1.0.1/go.mod h1:qiFZzvHokfxzeClKixx8Bx1aybQS9XzhpC8II7rsx/A=
8+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
9+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
10+
gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e h1:o/mfNjxpTLivuKEfxzzwrJ8PmulH2wEp7t713uMwKAA=
11+
gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=

0 commit comments

Comments
 (0)