Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
getty
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
getty
Commits
ed1b9b65
Unverified
Commit
ed1b9b65
authored
Sep 13, 2020
by
Psnail
Committed by
GitHub
Sep 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create go.yml
parent
fc4127d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
go.yml
.github/workflows/go.yml
+55
-0
No files found.
.github/workflows/go.yml
0 → 100644
View file @
ed1b9b65
name
:
Go
on
:
push
:
branches
:
[
master
]
pull_request
:
branches
:
"
*"
jobs
:
build
:
name
:
Build
runs-on
:
ubuntu-latest
strategy
:
matrix
:
go_version
:
-
1.13
os
:
-
ubuntu-latest
steps
:
-
name
:
Set up Go ${{ matrix.go_version }}
uses
:
actions/setup-go@v2
with
:
go-version
:
${{ matrix.go_version }}
id
:
go
-
name
:
Check out code into the Go module directory
uses
:
actions/checkout@v2
-
name
:
Cache Go Dependence
uses
:
actions/cache@v2
with
:
path
:
~/go/pkg/mod
key
:
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys
:
${{ runner.os }}-go-
-
name
:
Get dependencies
run
:
|
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
-
name
:
License Check
run
:
|
sh before_validate_license.sh
chmod u+x /tmp/tools/license/license-header-checker
go fmt ./... && [[ -z `git status -s` ]]
/tmp/tools/license/license-header-checker -v -a -r -i vendor /tmp/tools/license/license.txt . go && [[ -z `git status -s` ]]
-
name
:
Test
run
:
go mod vendor && go test $(go list ./... | grep -v vendor | grep -v demo) -coverprofile=coverage.txt -covermode=atomic
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment