Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run more limited test configurations #6717

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
95 changes: 29 additions & 66 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
PR_BASE_COMMIT: ${{ github.event.pull_request.base.sha }}
DOCKER_COMPOSE_FILE: ./develop/github/docker-compose.yml
TEMPORAL_VERSION_CHECK_DISABLED: 1
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_ANALYTICS_TOKEN }}

jobs:
set-up-single-test:
Expand All @@ -82,7 +81,7 @@
steps:
- id: generate_output
run: |
shards=3
shards=8
timeout=20 # update this to TEST_TIMEOUT if you update the Makefile
runs_on='["ubuntu-20.04"]'
if [[ "${{ inputs.run_single_functional_test }}" == "true" || "${{ inputs.run_single_unit_test }}" == "true" ]]; then
Expand Down Expand Up @@ -230,8 +229,6 @@
strategy:
fail-fast: false
runs-on: ubuntu-20.04
env:
BUILDKITE_MESSAGE: '{"job": "unit-test"}'
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -293,8 +290,6 @@
strategy:
fail-fast: false
runs-on: ubuntu-20.04
env:
BUILDKITE_MESSAGE: '{"job": "integration-test"}'
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -366,50 +361,51 @@
strategy:
fail-fast: false
matrix:
runs-on: ${{ fromJson(needs.set-up-single-test.outputs.runs_on) }}
shard_index: ${{ fromJson(needs.set-up-single-test.outputs.shard_indices) }}
name:
- cass_es
- cass_es8
- sqlite
- mysql8
- postgres12
- postgres12_pgx
name: [cass_es, sqlite]
include:
# These two get all tests:
- name: cass_es
persistence_type: nosql
persistence_driver: cassandra
containers: [cassandra, elasticsearch]
es_version: v7
parallel_flags: "-parallel=8"
- name: sqlite
persistence_type: sql
persistence_driver: sqlite
containers: []
parallel_flags: "-parallel=8"
# The rest get smoke tests only:
- name: cass_es8
persistence_type: nosql
persistence_driver: cassandra
containers: [cassandra, elasticsearch8]
es_version: v8
- name: sqlite
persistence_type: sql
persistence_driver: sqlite
containers: []
shard_index: smoke_only
- name: mysql8
persistence_type: sql
persistence_driver: mysql8
containers: [mysql]
shard_index: smoke_only
- name: postgres12
persistence_type: sql
persistence_driver: postgres12
containers: [postgresql]
shard_index: smoke_only
- name: postgres12_pgx
persistence_type: sql
persistence_driver: postgres12_pgx
containers: [postgresql]
runs-on: ${{ matrix.runs-on }}
shard_index: smoke_only
runs-on: ${{ fromJson(needs.set-up-single-test.outputs.runs_on) }}
env:
TEST_TOTAL_SHARDS: ${{ needs.set-up-single-test.outputs.total_shards }}
TEST_SHARD_INDEX: ${{ matrix.shard_index }}
PERSISTENCE_TYPE: ${{ matrix.persistence_type }}
PERSISTENCE_DRIVER: ${{ matrix.persistence_driver }}
TEST_TIMEOUT: ${{ needs.set-up-single-test.outputs.test_timeout }}
BUILDKITE_MESSAGE: '{"job": "functional-test", "db": "${{ matrix.persistence_driver }}"}'
TEST_PARALLEL_FLAGS: ${{ matrix.parallel_flags }}
steps:
- uses: ScribeMD/[email protected]
if: ${{ inputs.run_single_functional_test != true || (inputs.run_single_functional_test == true && contains(fromJSON(needs.set-up-single-test.outputs.dbs), env.PERSISTENCE_DRIVER)) }}
Expand Down Expand Up @@ -460,7 +456,7 @@
uses: actions/[email protected]
if: ${{ !cancelled() && !inputs.run_single_functional_test }}
with:
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{matrix.runs-on}}--${{matrix.name}}--${{matrix.shard_index}}--functional-test
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{matrix.name}}--${{matrix.shard_index}}--functional-test
path: .testoutput
include-hidden-files: true
retention-days: 28
Expand All @@ -484,39 +480,24 @@
strategy:
fail-fast: false
matrix:
name: [cass_es, cass_es8, mysql8, postgres12, postgres12_pgx]
shard_index: [0, 1]
name: [cass_es, sqlite]
include:
- name: cass_es
persistence_type: nosql
persistence_driver: elasticsearch
parallel_flags: ""
containers: [cassandra, elasticsearch]
- name: cass_es8
persistence_type: nosql
persistence_driver: elasticsearch
parallel_flags: ""
containers: [cassandra, elasticsearch8]
- name: mysql8
persistence_type: sql
persistence_driver: mysql8
parallel_flags: ""
containers: [mysql]
- name: postgres12
persistence_type: sql
persistence_driver: postgres12
parallel_flags: "-parallel=2" # reduce parallelism for postgres
containers: [postgresql]
- name: postgres12_pgx
- name: sqlite
persistence_type: sql
persistence_driver: postgres12_pgx
parallel_flags: "-parallel=2" # reduce parallelism for postgres
containers: [postgresql]
persistence_driver: sqlite
containers: []
runs-on: ubuntu-20.04
env:
TEST_TOTAL_SHARDS: 2
TEST_SHARD_INDEX: ${{ matrix.shard_index }}
PERSISTENCE_TYPE: ${{ matrix.persistence_type }}
PERSISTENCE_DRIVER: ${{ matrix.persistence_driver }}
BUILDKITE_MESSAGE: '{"job": "functional-test-xdc", "db": "${{ matrix.persistence_driver }}"}'
TEST_PARALLEL_FLAGS: ${{ matrix.parallel_flags }}

Check failure on line 500 in .github/workflows/run-tests.yml

View workflow job for this annotation

GitHub Actions / lint-actions

property "parallel_flags" is not defined in object type {containers: array<any>; name: string; persistence_driver: string; persistence_type: string; shard_index: number}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -557,7 +538,7 @@
uses: actions/[email protected]
if: ${{ !cancelled() }}
with:
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{matrix.name}}--functional-test-xdc
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{matrix.name}}--${{matrix.shard_index}}--functional-test-xdc
path: .testoutput
include-hidden-files: true
retention-days: 28
Expand All @@ -581,35 +562,17 @@
strategy:
fail-fast: false
matrix:
name:
- cass_es
- cass_es8
- mysql8
- postgres12
- postgres12_pgx
name: [cass_es, sqlite]
include:
- name: cass_es
persistence_type: nosql
persistence_driver: elasticsearch
containers: [cassandra, elasticsearch]
es_version: v7
- name: cass_es8
persistence_type: nosql
persistence_driver: elasticsearch
containers: [cassandra, elasticsearch8]
es_version: v8
- name: mysql8
persistence_type: sql
persistence_driver: mysql8
containers: [mysql]
- name: postgres12
persistence_type: sql
persistence_driver: postgres12
containers: [postgresql]
- name: postgres12_pgx
- name: sqlite
persistence_type: sql
persistence_driver: postgres12_pgx
containers: [postgresql]
persistence_driver: sqlite
containers: []
runs-on: ubuntu-20.04
env:
PERSISTENCE_TYPE: ${{ matrix.persistence_type }}
Expand Down
1 change: 1 addition & 0 deletions tests/links_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type LinksSuite struct {
}

func TestLinksTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(LinksSuite))
}

Expand Down
1 change: 1 addition & 0 deletions tests/max_buffered_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func TestMaxBufferedEventSuite(t *testing.T) {
}

func (s *MaxBufferedEventSuite) TestMaxBufferedEventsLimit() {
s.T().Skip("this test seems to get stuck, disabling temporarily")
/*
This test starts a workflow, and block its workflow task, then sending
signals to it which will be buffered. The default max buffered event
Expand Down
3 changes: 3 additions & 0 deletions tests/namespace_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func TestNamespaceSuite(t *testing.T) {
}

func (s *namespaceTestSuite) SetupSuite() {
// This suite doesn't embed FunctionalTestBase so we have to call CheckTestShard manually.
testcore.CheckTestShard(s.T(), false)

s.logger = log.NewTestLogger()
s.testClusterFactory = testcore.NewTestClusterFactory()

Expand Down
46 changes: 0 additions & 46 deletions tests/testcore/client.go

This file was deleted.

Loading
Loading