name acc test check step

& use parameter as force var env
main
Martin Guibert 2021-06-01 15:42:51 +02:00
parent 66ad988342
commit a693499c0d
2 changed files with 10 additions and 2 deletions

View File

@ -14,17 +14,23 @@ jobs:
- bin/
test_acc:
parameters:
force_acc_test:
type: boolean
default: false
pattern:
type: string
machine:
image: ubuntu-2004:202010-01
environment:
FORCE_ACC_TEST: << parameters.force_acc_test >>
ACC_PATTERN: << parameters.pattern >>
AWS_DEFAULT_REGION: us-east-1
CHECKPOINT_DISABLE: true # Disable terraform version check
steps:
- checkout
- run: ./scripts/halt_before_acc.sh
- run:
name: Check if acceptance tests should run
command: ./scripts/halt_before_acc.sh
- go/install:
version: "1.16.2"
# Disable cache at it seem to broke go 1.16 installation
@ -178,12 +184,13 @@ workflows:
name: "Acceptance tests: << matrix.pattern >>"
matrix:
parameters:
force_acc_test:
- true
pattern:
- TestAcc_Aws
- TestAcc_Github_
context:
- driftctl-acc
- nigthly
triggers:
- schedule:
cron: "0 3 * * *"

View File

@ -6,5 +6,6 @@ if [[ $COMMIT_MESSAGE == *"[RUN ACC]"* ]] || [[ $FORCE_ACC_TEST == "true" ]]; th
# If user is not member of core team, context is not applie so acc test won't run anyway
echo "Running acceptance tests"
else
echo "Not running acceptance tests"
circleci-agent step halt
fi