Skip to content

Commit

Permalink
Move script.sh to scripts/deploy.sh.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjbae1212 committed Aug 30, 2021
1 parent db8d4de commit 011fbb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
name: RUN UNIT TEST
environment:
GO111MODULE: "on"
command: bash script.sh test
command: bash scripts/deploy.sh test_with_circleci
7 changes: 4 additions & 3 deletions script.sh → scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/bin/bash
set -e -o pipefail
trap '[ "$?" -eq 0 ] || echo "Error Line:<$LINENO> Error Function:<${FUNCNAME}>"' EXIT
cd `dirname $0`
cd `dirname $0` && cd ..
CURRENT=`pwd`

function test
{
go test -v $(go list ./... | grep -v vendor) --count 1 -race -coverprofile=$CURRENT/coverage.txt -covermode=atomic
}

function build
function test_with_circleci
{
packr2 && go build
export CIRCLECI="true"
go test -v $(go list ./... | grep -v vendor) --count 1 -race -coverprofile=$CURRENT/coverage.txt -covermode=atomic
}

function release
Expand Down

0 comments on commit 011fbb3

Please sign in to comment.