diff --git a/.github/actions/contract-tests/action.yml b/.github/actions/contract-tests/action.yml new file mode 100644 index 0000000..7ce8ce7 --- /dev/null +++ b/.github/actions/contract-tests/action.yml @@ -0,0 +1,28 @@ +name: Contract Tests +description: 'Build and run SDK contract tests.' +inputs: + token: + description: 'GH token used to download SDK test harness.' + required: true + +runs: + using: composite + steps: + - name: Build contract test service + shell: bash + run: make build-contract-tests + + - name: Start contract test service + shell: bash + run: make start-contract-test-service-bg + + - name: Run contract tests + uses: launchdarkly/gh-actions/actions/contract-tests@contract-tests-v1 + with: + repo: sse-contract-tests + branch: main + version: v2 + token: ${{ inputs.token }} + test_service_port: '8000' + debug_logging: 'true' + enable_persistence_tests: 'false' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f370ad..3a27c45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,9 @@ jobs: # After junit/coverage artifacts: contract test failures must not skip uploads above. - name: Contract tests - run: make contract-tests + uses: ./.github/actions/contract-tests + with: + token: ${{ secrets.GITHUB_TOKEN }} windows: runs-on: windows-latest