Skip to content

Commit

Permalink
chore(browser-bundle): move to esbuild instead of browserify
Browse files Browse the repository at this point in the history
note that now the browser tests are not run on every push, but only on PRs.
developers can run them locally with `npm run test:browser`.

Fix eclipse-thingweb#387
  • Loading branch information
relu91 authored Dec 13, 2024
1 parent 07f764c commit 5ab4236
Show file tree
Hide file tree
Showing 29 changed files with 4,465 additions and 4,187 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages/browser-bundle/web-test-runner.config.mjs
32 changes: 32 additions & 0 deletions .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# docs https://playwright.dev/docs/ci-intro#setting-up-github-actions
name: Browser Tests

on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Install linux rollup optional dependencies
run: npm i @rollup/rollup-linux-x64-gnu -D
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Build
run: npm run build
- name: Test with browser bundle
timeout-minutes: 2
run: |
npm run test:browser
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actionsx/prettier@v2
- uses: actionsx/prettier@v3
with:
args: --check .
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
npm run test
2 changes: 1 addition & 1 deletion examples/browser/counter.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Browser Counter Example</title>
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Browser Native node-wot tryout</title>
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/smart-coffee-machine.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Smart Coffee Machine</title>
Expand Down
Loading

0 comments on commit 5ab4236

Please sign in to comment.