Merge pull request #260 from cloudskiff/parallel_acc_tests

Allow to run acceptance tests in parallel
main
Elie 2021-02-15 17:40:01 +01:00 committed by GitHub
commit 03ecc53e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -14,10 +14,15 @@ jobs:
paths:
- bin/
test_acc:
parameters:
pattern:
type: string
machine:
image: ubuntu-2004:202010-01
environment:
ACC_PATTERN: << parameters.pattern >>
AWS_DEFAULT_REGION: us-east-1
CHECKPOINT_DISABLE: true # Disable terraform version check
steps:
- checkout
- go/install:
@ -136,6 +141,12 @@ workflows:
nightly:
jobs:
- test_acc:
name: "Acceptance tests: << matrix.pattern >>"
matrix:
parameters:
pattern:
- TestAcc_Aws
- TestAcc_Github_
context: driftctl-acc
triggers:
- schedule:

View File

@ -10,6 +10,8 @@ GOTEST=gotestsum
GOGET=$(GOCMD) get
GOTOOL=$(GOCMD) tool
GOFMT=$(GOCMD) fmt
# ACC tests params
ACC_PATTERN ?= TestAcc_
.PHONY: FORCE
@ -34,7 +36,7 @@ coverage: test
.PHONY: acc
acc:
DRIFTCTL_ACC=true $(GOTEST) --format testname --junitfile unit-tests-acc.xml -- -coverprofile=cover-acc.out -test.timeout 1h -coverpkg=./pkg/... -run=TestAcc_ ./pkg/resource/...
DRIFTCTL_ACC=true $(GOTEST) --format testname --junitfile unit-tests-acc.xml -- -coverprofile=cover-acc.out -test.timeout 1h -coverpkg=./pkg/... -run=$(ACC_PATTERN) ./pkg/resource/...
.PHONY: mocks
mocks: deps