File tree Expand file tree Collapse file tree 4 files changed +53
-13
lines changed Expand file tree Collapse file tree 4 files changed +53
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : Go
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ jobs :
10
+
11
+ build :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v2
18
+ with :
19
+ go-version : 1.15
20
+
21
+ - name : Build
22
+ run : go build -v ./...
23
+
24
+ - name : Test
25
+ run : go test -v ./...
Original file line number Diff line number Diff line change
1
+ name : golangci-lint
2
+ on :
3
+ push :
4
+ tags :
5
+ - v*
6
+ branches :
7
+ - master
8
+ - main
9
+ pull_request :
10
+ jobs :
11
+ golangci :
12
+ name : lint
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+ - name : golangci-lint
17
+ uses : golangci/golangci-lint-action@v2
18
+ with :
19
+ version : v1.34
20
+ only-new-issues : true
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,14 +7,20 @@ import (
7
7
"github.com/go-git/go-git/v5/plumbing"
8
8
)
9
9
10
- // MakeCloneOptions determines if we are running in Travis ,
10
+ // MakeCloneOptions determines if we are running in GitHub ,
11
11
// and ensures that it's using the correct branch.
12
+ //
13
+ // This is because the codebase that the tests run in is not a clone, so we have
14
+ // to clone the upstream.
15
+ //
16
+ // For local development, you're working on the branch, and we can use that
17
+ // branch correctly.
12
18
func MakeCloneOptions () * git.CloneOptions {
13
19
o := & git.CloneOptions {
14
20
URL : "../.." ,
15
21
Depth : 1 ,
16
22
}
17
- if b := os .Getenv ("TRAVIS_PULL_REQUEST_BRANCH " ); b != "" {
23
+ if b := os .Getenv ("GITHUB_BASE_REF " ); b != "" {
18
24
o .ReferenceName = plumbing .NewBranchReferenceName (b )
19
25
o .URL = "https://github.com/redhat-developer/gitops-backend.git"
20
26
}
You can’t perform that action at this time.
0 commit comments