Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/actions/contract-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ inputs:
description: 'Whether to run contract tests from the latest v3 release'
required: false
default: 'false'
enable_long_running_tests:
description: 'Whether to run harness tests that wait on real backoff timing. These add about an hour, so only the nightly enables them.'
required: false
default: 'false'

runs:
using: composite
Expand Down Expand Up @@ -54,7 +58,7 @@ runs:
enable_persistence_tests: 'false'
# Leave the service up for the FDv2 run that follows.
stop_service: ${{ inputs.run_fdv2_tests == 'true' && 'false' || 'true' }}
extra_params: '-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE }}'
extra_params: "-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE }}${{ inputs.enable_long_running_tests == 'true' && ' -enable-long-running-tests' || '' }}"
token: ${{ inputs.token }}

- name: Run Contract Tests FDv2 Flavor
Expand All @@ -65,7 +69,7 @@ runs:
version: 'v3'
debug_logging: 'true'
enable_persistence_tests: 'false'
extra_params: '-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE_FDV2 }}'
extra_params: "-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE_FDV2 }}${{ inputs.enable_long_running_tests == 'true' && ' -enable-long-running-tests' || '' }}"
token: ${{ inputs.token }}

- name: Upload test service log on failure
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/sdk-server-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: LaunchDarkly.ServerSdk Nightly Contract Tests

on:
schedule:
- cron: '0 4 * * *' # every day at 4am UTC
workflow_dispatch:
inputs:
branch:
description: 'Branch to run contract tests on'
required: false
default: ''

permissions:
contents: read

jobs:
nightly-contract-tests:
runs-on: ubuntu-latest
# The long-running tests are almost entirely wall-clock waiting, so this job runs
# roughly an hour. A regression that stops retrying makes each scenario burn its
# full timeout instead of returning early, so leave headroom -- while staying well
# under the 6-hour default that would otherwise apply.
timeout-minutes: 120

steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || github.ref }}

- name: Setup Env from project's Env file
shell: bash
run: cat pkgs/sdk/server/github_actions.env >> "$GITHUB_ENV"

- uses: ./.github/actions/contract-tests
with:
service_project_file: ${{ env.CONTRACT_TEST_PROJECT_FILE }}
service_dll_file: ${{ env.CONTRACT_TEST_DLL_FILE }}
token: ${{ secrets.GITHUB_TOKEN }}
run_fdv2_tests: 'true'
enable_long_running_tests: 'true'

- name: Upload test service log
if: always()
uses: actions/upload-artifact@v4
with:
name: contract-test-service-log
path: test-service.log
if-no-files-found: warn
Loading