chore: Add hook support in browser contract tests #2825
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: sdk/server-node | |
| on: | |
| push: | |
| branches: [main, 'feat/**'] | |
| paths-ignore: | |
| - '**.md' #Do not need to run CI for markdown changes. | |
| pull_request: | |
| branches: [main, 'feat/**'] | |
| paths-ignore: | |
| - '**.md' | |
| jobs: | |
| build-test-server-node: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # Node versions to run on. | |
| version: [18, 21] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.version }} | |
| registry-url: 'https://registry.npmjs.org' | |
| - id: shared | |
| name: Shared CI Steps | |
| uses: ./actions/ci | |
| with: | |
| workspace_name: '@launchdarkly/node-server-sdk' | |
| workspace_path: packages/sdk/server-node | |
| - name: Install contract test service dependencies | |
| run: yarn workspace node-server-sdk-contract-tests install --no-immutable | |
| - name: Build the test service | |
| run: yarn contract-test-service-build | |
| - name: Launch the test service in the background | |
| run: yarn contract-test-service 2>&1 & | |
| - uses: launchdarkly/gh-actions/actions/[email protected] | |
| with: | |
| test_service_port: 8000 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| extra_params: '--skip-from=./contract-tests/testharness-suppressions.txt' |