Skip to content

Commit af08f94

Browse files
committed
Run tests using shared action.
1 parent 7d20d35 commit af08f94

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

.github/workflows/browser.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ jobs:
4848
run: npx playwright install --with-deps chromium
4949

5050
- name: Install contract test dependencies
51-
run: |
52-
yarn workspace browser-contract-test-adapter install --no-immutable
53-
yarn workspace browser-contract-test-service install --no-immutable
51+
run: yarn workspaces focus browser-contract-test-adapter browser-contract-test-service
5452

5553
- name: Build contract test adapter
5654
run: yarn workspace browser-contract-test-adapter run build
@@ -105,14 +103,11 @@ jobs:
105103
sleep 5 # Give the browser time to initialize and connect via WebSocket
106104
107105
- name: Run contract tests
108-
run: |
109-
mkdir -p /tmp/sdk-test-harness
110-
git clone https://github.com/launchdarkly/sdk-test-harness.git /tmp/sdk-test-harness
111-
cd /tmp/sdk-test-harness
112-
go build -o test-harness .
113-
./test-harness -url http://localhost:8000 -debug -stop-service-at-end --skip-from=$GITHUB_WORKSPACE/packages/sdk/browser/contract-tests/suppressions.txt
114-
env:
115-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106+
uses: launchdarkly/gh-actions/actions/contract-tests@21174f3a7f3aa3e3121227ec91842e8a1ebeec6e
107+
with:
108+
test_service_port: 8000
109+
token: ${{ secrets.GITHUB_TOKEN }}
110+
extra_params: '--skip-from=${{ github.workspace }}/packages/sdk/browser/contract-tests/suppressions.txt --stop-service-at-end'
116111

117112
- name: Print logs on failure
118113
if: failure()

0 commit comments

Comments
 (0)