Skip to content

Commit

Permalink
test: 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 1911561 commit c4bbc10
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 47 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/app-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
with:
fetch-depth: 0

- name: Install xvfb
if: runner.os == 'ubuntu-latest'
run: |
apt install -y -q --no-install-recommends xvfb
- name: Setup NodeJS ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
Expand All @@ -50,5 +55,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 != 'ubuntu-latest'
run: |
npm run test
- name: Test module script (Linux)
if: runner.os == 'ubuntu-latest'
run: |
npm run test:linux
43 changes: 1 addition & 42 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,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"
},
"engines": {
"node": ">=18.0.0"
Expand Down Expand Up @@ -70,7 +71,6 @@
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-vuetify": "^1.0.2",
"vue-eslint-parser": "^9.3.2",
"vue-tsc": "^1.8.22",
"xvfb-maybe": "^0.2.1"
"vue-tsc": "^1.8.22"
}
}

0 comments on commit c4bbc10

Please sign in to comment.