Skip to content

Commit ebd156e

Browse files
authored
Merge pull request #15 from ivanvc/migrate-from-travisci
Migrate from travisci
2 parents 0718cc5 + 19646e4 commit ebd156e

File tree

4 files changed

+28
-35
lines changed

4 files changed

+28
-35
lines changed

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
default: test
2+
3+
.PHONY: test
4+
test:
5+
./scripts/test.sh

scripts/test.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
echo "Running tests..."
4+
go test -v -cover -cpu 1,2,4 ./...
5+
go test -v -cover -cpu 1,2,4 -race ./...
6+
7+
echo "Checking gofmt..."
8+
# We utilize 'go fmt' to find all files suitable for formatting,
9+
# but reuse full power gofmt to perform just RO check.
10+
fmt_res=$(go fmt -n ./... | sed 's| -w | -d |g' | sh)
11+
if [ -n "${fmt_res}" ]; then
12+
echo -e "gofmt checking failed:\n${fmt_res}"
13+
exit 1
14+
fi
15+
16+
echo "Checking govet..."
17+
vet_res=$(go vet ./...)
18+
if [ -n "${vet_res}" ]; then
19+
echo -e "govet checking failed:\n${vet_res}"
20+
exit 1
21+
fi
22+
23+
echo "Success"

test

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)