mirror of
https://github.com/status-im/consul.git
synced 2025-02-27 21:00:44 +00:00
ci: try to run only -short on PR branches
This commit is contained in:
parent
f00a93c795
commit
01ed9e3c60
@ -112,6 +112,10 @@ commands:
|
|||||||
echo "export AWS_SESSION_TOKEN=$(echo $CREDENTIALS | jq -r '.SessionToken')" >> $BASH_ENV
|
echo "export AWS_SESSION_TOKEN=$(echo $CREDENTIALS | jq -r '.SessionToken')" >> $BASH_ENV
|
||||||
|
|
||||||
run-go-test-full:
|
run-go-test-full:
|
||||||
|
parameters:
|
||||||
|
go_test_flags:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: /home/circleci/go/bin
|
at: /home/circleci/go/bin
|
||||||
@ -127,6 +131,9 @@ commands:
|
|||||||
echo $PACKAGE_NAMES
|
echo $PACKAGE_NAMES
|
||||||
# some tests expect this umask, and arm images have a different default
|
# some tests expect this umask, and arm images have a different default
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
|
<< parameters.go_test_flags >>
|
||||||
|
|
||||||
gotestsum \
|
gotestsum \
|
||||||
--format=short-verbose \
|
--format=short-verbose \
|
||||||
--jsonfile /tmp/jsonfile/go-test-${CIRCLE_NODE_INDEX}.log \
|
--jsonfile /tmp/jsonfile/go-test-${CIRCLE_NODE_INDEX}.log \
|
||||||
@ -137,6 +144,7 @@ commands:
|
|||||||
--packages="$PACKAGE_NAMES" \
|
--packages="$PACKAGE_NAMES" \
|
||||||
--junitfile $TEST_RESULTS_DIR/gotestsum-report.xml -- \
|
--junitfile $TEST_RESULTS_DIR/gotestsum-report.xml -- \
|
||||||
-tags="$GOTAGS" -p 2 \
|
-tags="$GOTAGS" -p 2 \
|
||||||
|
${GO_TEST_FLAGS-} \
|
||||||
-cover -coverprofile=coverage.txt
|
-cover -coverprofile=coverage.txt
|
||||||
|
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
@ -260,7 +268,8 @@ jobs:
|
|||||||
sudo tar -C /usr/local -xzvf go1.17.5.linux-arm64.tar.gz
|
sudo tar -C /usr/local -xzvf go1.17.5.linux-arm64.tar.gz
|
||||||
- run: make dev
|
- run: make dev
|
||||||
- run: *install-gotestsum
|
- run: *install-gotestsum
|
||||||
- run-go-test-full
|
- run-go-test-full:
|
||||||
|
go_test_flags: 'if ! [[ "$CIRCLE_BRANCH" =~ ^main$|^release/ ]]; then export GO_TEST_FLAGS="-short"; fi'
|
||||||
|
|
||||||
go-test:
|
go-test:
|
||||||
docker:
|
docker:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user