Skip to content

Commit

Permalink
IWF-232: Add integration test parallelization
Browse files Browse the repository at this point in the history
  • Loading branch information
lwolczynski committed Oct 31, 2024
1 parent 0f513cd commit 1f655b8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci-cadence-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ jobs:
tests:
name: "Integration testing"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-subset:
- "A-M"
- "N-Z"
steps:
- uses: actions/checkout@v3
- name: "Set up cadence environment"
run: docker compose -f docker-compose/ci-cadence-dependencies.yml up -d
- name: "Test against cadence"
run: make ci-cadence-integ-test
run: make ci-cadence-integ-test startsWith=${{ matrix['test-subset'] }}
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2
9 changes: 8 additions & 1 deletion .github/workflows/ci-temporal-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ jobs:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
strategy:
fail-fast: false
matrix:
test-subset:
- "A-M"
- "N-Z"

steps:
- uses: actions/checkout@v3
- name: "Set up temporal environment"
run: docker compose -f docker-compose/ci-temporal-dependencies.yml up -d
- name: "Test against temporal"
run: make ci-temporal-integ-test
run: make ci-temporal-integ-test startsWith=${{ matrix['test-subset'] }}
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,18 @@ cadenceIntegTests:
$Q go test -v ./integ -temporal=false

ci-cadence-integ-test:
ifeq (${startsWith},)
$Q go test -v ./integ -search=false -temporal=false -dependencyWaitSeconds=180 -disableStickyCache=true
else
$Q go test -v ./integ "^Test[${startsWith}]" -search=false -temporal=false -dependencyWaitSeconds=180 -disableStickyCache=true
endif

ci-temporal-integ-test:
$Q go test -v ./integ -cover -coverprofile coverage.out -coverpkg ./service/... -search=false -cadence=false -dependencyWaitSeconds=60 -disableStickyCache=true
ifeq (${startsWith},)
$Q go test -v ./integ -run -cover -coverprofile coverage.out -coverpkg ./service/... -search=false -cadence=false -dependencyWaitSeconds=60 -disableStickyCache=true
else
$Q go test -v ./integ -run "^Test[${startsWith}]" -cover -coverprofile coverage.out -coverpkg ./service/... -search=false -cadence=false -dependencyWaitSeconds=60 -disableStickyCache=true
endif

ci-all-tests:
# Fails CI when used with -coverprofile flag due to tests that panic; see https://go.dev/doc/build-cover#panicprof
Expand Down

0 comments on commit 1f655b8

Please sign in to comment.