Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Jul 28, 2024
1 parent d16434a commit bb92870
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
BASE_PATH: ${{ steps.configurepages.outputs.base_path }}

# Tests (only for PRs)
- run: ./docker.sh
- run: ./test.sh
if: github.event_name == 'pull_request'
env:
BASE_PATH: ${{ steps.configurepages.outputs.base_path }}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ To update the snapshots: `npm test -- -- --update-snapshots`
For reproductible snapshots, we use docker to run the tests:
```sh
$ ./docker.sh
$ ./test.sh
```
To update the snapshots: `./docker.sh --update`
To update the snapshots: `./test.sh --update`
> [!IMPORTANT]
> If you built the project with eg. `BASE_PATH=/examples` you'll need to:
>
> ```sh
> $ BASE_PATH=/examples ./docker.sh
> $ BASE_PATH=/examples ./test.sh
> ```
# Colophon
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "examples",
"private": true,
"scripts": {
"build": "turbo build2 --filter=./demos/{aquarium,baking-soft-shadows} && turbo website#build && ./copy.sh",
"build": "turbo build2 --filter=./demos/* && turbo website#build && ./copy.sh",
"dev": "turbo dev",
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"test": "turbo test --filter=./demos/* --continue --concurrency=1 --force"
"test": "turbo test --filter=./demos/* --continue"
},
"devDependencies": {
"@playwright/test": "1.45.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/examples/bin/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ teardown(0);
function teardown(code = 0) {
console.log("Tearing down...");

playwright.kill();
vite.kill();
playwright?.kill();
vite?.kill();
process.exit(code);
}

Expand Down
1 change: 1 addition & 0 deletions docker.sh → test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if [ "$1" = "--update" ]; then
UPDATE_FLAG="-- -- --update-snapshots"
fi

# Intermediary `myplaywright` image with Node+Playwright installed
docker build -t myplaywright -f - . <<EOF
FROM node:20-bookworm
RUN npx -y playwright@1.45.3 install --with-deps chromium
Expand Down

0 comments on commit bb92870

Please sign in to comment.