Skip to content

Commit

Permalink
use native xvfb instead of node package
Browse files Browse the repository at this point in the history
  • Loading branch information
jooy2 committed Nov 15, 2023
1 parent 16b25ba commit 91667cc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 84 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/app-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ jobs:
strategy:
fail-fast: false
matrix:
node_version: ['16', '18', '20']
node_version: ['18', '20']
os: [windows-latest, macos-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install xvfb
if: runner.os == 'Linux'
run: |
sudo apt install -y -q --no-install-recommends xvfb
- name: Setup NodeJS ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
Expand All @@ -48,5 +53,12 @@ jobs:
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm i

- name: Test module script
run: npm run test
- name: Test module script (Windows or macOS)
if: runner.os != 'Linux'
run: |
npm run test
- name: Test module script (Linux)
if: runner.os == 'Linux'
run: |
npm run test:linux
79 changes: 1 addition & 78 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"bugs": {
"url": "https://github.com/jooy2/retron/issues"
},
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"dev": "vite",
"dev:debug": "vite -d",
Expand All @@ -30,7 +33,8 @@
"lint:fix": "eslint --ext .js,.ts,.vue -f ./node_modules/eslint-friendly-formatter --fix src",
"format": "prettier .",
"format:fix": "prettier . --write",
"test": "npm run build:pre && xvfb-maybe -- playwright test"
"test": "npm run build:pre && playwright test",
"test:linux": "npm run build:pre && xvfb-run --auto-servernum --server-args='-screen 0, 1280x960x24' -- playwright test"
},
"dependencies": {
"@emotion/react": "^11.11.1",
Expand Down Expand Up @@ -73,8 +77,7 @@
"vite": "^4.5.0",
"vite-plugin-electron": "^0.15.4",
"vite-plugin-electron-renderer": "^0.14.5",
"vite-plugin-eslint": "^1.8.1",
"xvfb-maybe": "^0.2.1"
"vite-plugin-eslint": "^1.8.1"
},
"eslintConfig": {
"extends": "react-app"
Expand Down

0 comments on commit 91667cc

Please sign in to comment.