-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add github build and test actions
- Loading branch information
1 parent
2829caa
commit 520e814
Showing
8 changed files
with
69 additions
and
45 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Release Workflow | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: tag | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Test Workflow | ||
on: | ||
push: | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
container: golang:1.14-alpine | ||
env: | ||
CGO_ENABLED: 0 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: | | ||
go mod download | ||
mkdir .coverage | ||
go test -v ./assured -cover -coverprofile=.coverage/assured.coverprofile | ||
- name: Coveralls | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: .coverage/assured.coverprofile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
bin/ | ||
coverage/ | ||
.coverage/ | ||
vendor/ | ||
.vscode/ | ||
debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
GO ?= go | ||
COVERAGEDIR = coverage | ||
ifdef CIRCLE_ARTIFACTS | ||
COVERAGEDIR=$(CIRCLE_ARTIFACTS)/coverage | ||
endif | ||
|
||
COVERAGEDIR = .coverage | ||
LDFLAGS = -ldflags '-X main.gitSHA=$(shell git rev-parse HEAD)' | ||
|
||
all: build test cover | ||
dependencies: | ||
go mod download | ||
build: | ||
if [ ! -d bin ]; then mkdir bin; fi | ||
$(GO) build $(LDFLAGS) -v -o bin/go-rest-assured | ||
go build $(LDFLAGS) -v -o bin/go-rest-assured | ||
fmt: | ||
go mod tidy | ||
gofmt -w -l -s *.go | ||
assert-no-diff: | ||
test -z "$(shell git status --porcelain)" | ||
test: | ||
if [ ! -d $(COVERAGEDIR) ]; then mkdir $(COVERAGEDIR); fi | ||
$(GO) test -v ./assured -cover -coverprofile=$(COVERAGEDIR)/assured.coverprofile | ||
go test -v ./assured -cover -coverprofile=$(COVERAGEDIR)/assured.coverprofile | ||
cover: | ||
if [ ! -d $(COVERAGEDIR) ]; then mkdir $(COVERAGEDIR); fi | ||
$(GO) tool cover -html=$(COVERAGEDIR)/assured.coverprofile -o $(COVERAGEDIR)/assured.html | ||
coveralls: | ||
if [ ! -d $(COVERAGEDIR) ]; then mkdir $(COVERAGEDIR); fi | ||
gover $(COVERAGEDIR) $(COVERAGEDIR)/coveralls.coverprofile | ||
goveralls -coverprofile=$(COVERAGEDIR)/coveralls.coverprofile -service=circle-ci -repotoken=$(COVERALLS_TOKEN) | ||
assert-no-diff: | ||
test -z "$(shell git status --porcelain)" | ||
go tool cover -html=$(COVERAGEDIR)/assured.coverprofile | ||
clean: | ||
$(GO) clean | ||
go clean | ||
rm -f bin/go-rest-assured | ||
rm -rf coverage/ | ||
rm -rf $(COVERAGEDIR) | ||
rm -rf vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters