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
3 changes: 1 addition & 2 deletions .github/workflows/lint-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ jobs:
cache: yarn
- run: yarn --immutable
- run: yarn build
- run: yarn ocap bundle ./packages/extension/src/vats/sample-vat.js
- run: yarn test:e2e
- run: yarn test:e2e:ci
- name: Require clean working directory
shell: bash
run: |
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"test:dev": "yarn test --coverage false",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts",
"test:e2e": "yarn start:server & playwright test",
"test:e2e": "yarn playwright test",
"test:e2e:ci": "./scripts/test-e2e-ci.sh",
"test:e2e:ui": "playwright test --ui",
"test:e2e:debug": "playwright test --debug",
"start:server": "yarn ocap serve ./src/vats -p 3000 -h 10000"
"test:e2e:debug": "playwright test --debug"
},
"dependencies": {
"@endo/eventual-send": "^1.2.6",
Expand Down
22 changes: 22 additions & 0 deletions packages/extension/scripts/test-e2e-ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -x
set -e
set -o pipefail

yarn ocap bundle "./src/vats"

# Start the server in background and capture its PID
yarn ocap serve "./src/vats" &
SERVER_PID=$!

function cleanup() {
# Kill the server if it's still running
if kill -0 $SERVER_PID 2>/dev/null; then
kill $SERVER_PID
fi
}
# Ensure we always close the server
trap cleanup EXIT

yarn test:e2e
Loading