Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cashier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
cashier
Commits
13054312
Commit
13054312
authored
8 years ago
by
Kevin Lyda
Committed by
Niall Sheridan
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Move tests out of travis config to a standalone script
Can also be used as a pre-commit hook.
parent
fe53f90b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.travis.yml
+1
-5
1 addition, 5 deletions
.travis.yml
run_tests.sh
+16
-0
16 additions, 0 deletions
run_tests.sh
with
17 additions
and
5 deletions
.travis.yml
+
1
−
5
View file @
13054312
...
...
@@ -26,8 +26,4 @@ before_script:
sudo
:
false
script
:
-
go install -v ./cmd/cashier ./cmd/cashierd
-
go list ./... |grep -v vendor/ |xargs go test
-
gofmt -d $(find -type f -name '*.go' -not -path './vendor/*')
-
go list ./... |grep -v vendor/ |xargs go vet
-
go list ./... |grep -v vendor/ |xargs -L1 golint -set_exit_status
-
./run_tests.sh
This diff is collapsed.
Click to expand it.
run_tests.sh
0 → 100755
+
16
−
0
View file @
13054312
#! /bin/sh
# This can be used as a pre-commit script. Just run
# cp run_tests.sh .git/hooks/pre-commit
# and it will run before each commit.
set
-xue
go
install
-v
./cmd/cashier ./cmd/cashierd
go list ./... |grep
-v
vendor/ |xargs go
test
gofmt
-d
$(
find
*
-type
f
-name
'*.go'
-not
-path
'vendor/*'
)
go list ./... |grep
-v
vendor/ |xargs go vet
if
!
type
-f
golint
>
/dev/null
;
then
go get
-u
github.com/golang/lint/golint
fi
go list ./... |grep
-v
vendor/ |xargs
-L1
golint
-set_exit_status
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment