Skip to content

Commit 7e2ded7

Browse files
committed
tuning workflow and adding some test exceptions for the moment
1 parent 3365a34 commit 7e2ded7

File tree

4 files changed

+60
-15
lines changed

4 files changed

+60
-15
lines changed
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
name: Contract Tests
2-
description: Runs Contract Tests
2+
description: Runs Contract Tests (builds, starts service, runs SDK contract test harness)
33
inputs:
44
workspace_path:
5-
description: 'Path to the package.'
5+
description: 'Path to the package (e.g. lib/sdk/server).'
66
required: true
77
token:
88
description: 'Github token, used for contract tests'
99
required: false
1010
default: ''
11+
test_harness_params:
12+
description: 'Optional extra parameters for the SDK test harness (e.g. -enable-long-running-tests). Passed as TEST_HARNESS_PARAMS to make.'
13+
required: false
14+
default: ''
1115

1216
runs:
1317
using: composite
1418
steps:
1519
- name: Run contract tests
1620
shell: bash
17-
run: make contract-tests -C ${{ inputs.workspace_path }}
21+
run: make contract-tests -C ${{ inputs.workspace_path }} TEST_HARNESS_PARAMS="${{ inputs.test_harness_params }}"

.github/workflows/nightly-contract-tests.yml

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,37 @@ on:
44
schedule:
55
- cron: "0 4 * * *" # every day at 4am UTC
66
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: 'Branch to run contract tests on'
10+
required: false
11+
default: ''
12+
test_slack_notification:
13+
description: 'Also send a test Slack notification (to verify Slack integration)'
14+
required: false
15+
type: boolean
16+
default: false
717

818
jobs:
919
nightly-contract-tests:
1020
runs-on: ubuntu-latest
1121
steps:
1222
- uses: actions/checkout@v3
23+
with:
24+
ref: ${{ inputs.branch || github.ref }}
1325

1426
- name: Shared CI Steps
1527
uses: ./.github/actions/ci
1628
with:
1729
workspace_path: 'lib/sdk/server'
1830
java_version: 8
1931

20-
- name: Build Contract Tests
21-
shell: bash
22-
run: make build-contract-tests -C lib/sdk/server
23-
24-
- name: Start Contract Test Service
25-
shell: bash
26-
run: make start-contract-test-service-bg -C lib/sdk/server
27-
28-
- name: Run Contract Tests with Long-Running Tests
29-
shell: bash
30-
run: make run-contract-tests -C lib/sdk/server TEST_HARNESS_PARAMS="-enable-long-running-tests"
32+
- name: Contract Tests (with long-running tests)
33+
uses: ./.github/actions/contract-tests
34+
with:
35+
workspace_path: 'lib/sdk/server'
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
test_harness_params: '-enable-long-running-tests'
3138

3239
notify-slack-on-failure:
3340
runs-on: ubuntu-latest
@@ -47,7 +54,7 @@ jobs:
4754
"type": "section",
4855
"text": {
4956
"type": "mrkdwn",
50-
"text": ":warning: *Nightly Contract Tests Failed* :warning:\nThe nightly contract tests (with long-running tests enabled) failed on `main`."
57+
"text": ":warning: *Nightly Contract Tests Failed* :warning:\nThe nightly contract tests (with long-running tests enabled) failed on `${{ github.ref_name }}`."
5158
},
5259
"accessory": {
5360
"type": "button",
@@ -60,3 +67,33 @@ jobs:
6067
}
6168
]
6269
}
70+
71+
test-slack-notification:
72+
runs-on: ubuntu-latest
73+
if: ${{ inputs.test_slack_notification == true || inputs.test_slack_notification == 'true' }}
74+
steps:
75+
- name: Send test Slack notification
76+
uses: slackapi/slack-github-action@v2.1.0
77+
with:
78+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
79+
webhook-type: incoming-webhook
80+
payload: |
81+
{
82+
"blocks": [
83+
{
84+
"type": "section",
85+
"text": {
86+
"type": "mrkdwn",
87+
"text": ":white_check_mark: *Nightly Contract Tests – Slack test*\nThis is a test notification to verify Slack integration is working. Triggered manually from the Nightly Contract Tests workflow."
88+
},
89+
"accessory": {
90+
"type": "button",
91+
"text": {
92+
"type": "plain_text",
93+
"text": "View workflow run"
94+
},
95+
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
96+
}
97+
}
98+
]
99+
}

lib/sdk/server/contract-tests/service/src/main/java/sdktest/TestService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class TestService {
4141
"service-endpoints",
4242
"strongly-typed",
4343
"tags",
44+
"server-side-polling"
4445
};
4546

4647
static final Gson gson = new GsonBuilder().serializeNulls().create();
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
streaming/fdv2/recoverable fallback to secondary synchronizer
2+
streaming/fdv2/recoverable fallback with recovery
3+
streaming/fdv2/permanent fallback with recovery

0 commit comments

Comments
 (0)