-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #704 from webdriverio-community/sm/no-binary
(feat): appEntryPoint
- Loading branch information
Showing
67 changed files
with
2,402 additions
and
1,812 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,11 @@ env: | |
|
||
jobs: | ||
build: | ||
name: Build & Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
os: [ubuntu-latest, macOS-latest] | ||
node-version: [20.x] | ||
fail-fast: false | ||
|
||
|
@@ -37,33 +38,127 @@ jobs: | |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9.5.0 | ||
version: 9.7.0 | ||
run_install: false | ||
- name: Set pnpm store path | ||
run: | | ||
pnpm config set store-dir ~/.pnpm-store --global | ||
- name: Install Dependencies | ||
run: | | ||
pnpm install | ||
if [ "$RUNNER_OS" == "Windows" ]; then | ||
pnpm run ci:init-windows | ||
pnpm install --no-frozen-lockfile | ||
shell: bash | ||
- name: Run Tests | ||
run: | | ||
if [ "$RUNNER_OS" == "Linux" ]; then | ||
# Run tasks in serial on Ubuntu to avoid Xvfb issues | ||
pnpm run ci-linux | ||
else | ||
pnpm run ci | ||
fi | ||
shell: bash | ||
- name: 🐛 Show logs | ||
if: failure() | ||
run: | | ||
pnpm run ci:e2e:logs | ||
- name: 🐛 Debug Build | ||
uses: stateful/[email protected] | ||
if: failure() | ||
with: | ||
timeout: '180000' | ||
build-macos-universal: | ||
name: MacOS Universal Build & Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macOS-latest] | ||
node-version: [20.x] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Cache pnpm modules | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-pnpm-modules | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9.7.0 | ||
run_install: false | ||
- name: Set pnpm store path | ||
run: | | ||
pnpm config set store-dir ~/.pnpm-store --global | ||
- name: Install Dependencies | ||
run: | | ||
pnpm install | ||
shell: bash | ||
- name: Run Tests | ||
run: | | ||
pnpm run ci | ||
pnpm run build | ||
pnpm run ci-mac:e2e:mac-universal | ||
shell: bash | ||
- name: Run OS-specific Tests | ||
- name: 🐛 Show logs | ||
if: failure() | ||
run: | | ||
if [ "$RUNNER_OS" == "macOS" ]; then | ||
pnpm run ci:e2e:clean | ||
pnpm install --no-frozen-lockfile | ||
pnpm run ci:e2e:mac-universal | ||
fi | ||
pnpm run ci:e2e:logs | ||
- name: 🐛 Debug Build | ||
uses: stateful/[email protected] | ||
if: failure() | ||
with: | ||
timeout: '180000' | ||
build-windows: | ||
name: Windows Build & Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
test: ['units', 'e2e:no-binary', 'e2e:builder-cjs', 'e2e:builder-esm', 'e2e:forge-cjs', 'e2e:forge-esm'] | ||
node-version: [20.x] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Cache pnpm modules | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-pnpm-modules | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9.7.1 | ||
run_install: false | ||
- name: Set pnpm store path | ||
run: | | ||
pnpm config set store-dir ~/.pnpm-store --global | ||
- name: Install Dependencies | ||
run: | | ||
pnpm install | ||
shell: bash | ||
- name: Run Tests | ||
run: | | ||
pnpm run build | ||
pnpm run ci-windows:${{ matrix.test }} | ||
shell: bash | ||
- name: 🐛 Show logs | ||
if: failure() | ||
run: | | ||
pnpm run ci:e2e:logs | ||
- name: 🐛 Debug Build | ||
uses: stateful/vscode-server-action@v1 | ||
uses: stateful/vscode-server-action@v1.1.0 | ||
if: failure() | ||
with: | ||
timeout: '180000' |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.
This file contains 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
Empty file.
This file contains 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
This file contains 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
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# no-binary-cjs | ||
|
||
A CJS project for a minimal Electron app, designed to provide E2E testing for `wdio-electron-service`. | ||
|
||
The app is not built but has been bundled. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "example-no-binary-cjs", | ||
"version": "1.0.0", | ||
"main": "dist/main.bundle.js", | ||
"private": true, | ||
"scripts": { | ||
"build": "tsc && rollup -c rollup.config.mjs && cp ./src/index.html ./dist", | ||
"clean": "pnpm clean:dist && pnpm dlx shx rm -rf ./node_modules ./wdio-logs", | ||
"clean:dist": "pnpm dlx shx rm -rf ./dist && pnpm dlx shx mkdir -p ./dist" | ||
}, | ||
"dependencies": { | ||
"wdio-electron-service": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^26.0.1", | ||
"@rollup/plugin-node-resolve": "^15.2.1", | ||
"@types/node": "^20.14.12", | ||
"@wdio/cli": "^9.0.4", | ||
"@wdio/globals": "^9.0.4", | ||
"@wdio/local-runner": "^9.0.4", | ||
"@wdio/mocha-framework": "^9.0.4", | ||
"cross-env": "^7.0.3", | ||
"electron": "^31.4.0", | ||
"global-jsdom": "^24.0.0", | ||
"jsdom": "^24.1.1", | ||
"rollup": "^4.21.0", | ||
"ts-loader": "^9.4.4", | ||
"tsx": "^4.17.0", | ||
"typescript": "^5.5.4", | ||
"webdriverio": "^9.0.4" | ||
}, | ||
"peerDependencies": { | ||
"typescript": "5.2.2" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
|
||
export default [ | ||
{ | ||
input: 'dist/preload.js', | ||
output: { | ||
file: 'dist/preload.bundle.js', | ||
inlineDynamicImports: true, | ||
format: 'cjs', | ||
}, | ||
plugins: [nodeResolve(), commonjs()], | ||
external: ['electron'], | ||
}, | ||
{ | ||
input: 'dist/main.js', | ||
output: { | ||
file: 'dist/main.bundle.js', | ||
inlineDynamicImports: true, | ||
format: 'cjs', | ||
}, | ||
plugins: [nodeResolve(), commonjs()], | ||
external: ['electron'], | ||
}, | ||
]; |
Oops, something went wrong.