GHA: Use xvfb-run #35
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
name: ci | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16, 18, 20] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Chrome | |
run: | | |
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | |
sudo apt update | |
sudo apt install --only-upgrade google-chrome-stable | |
google-chrome --version | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install packages | |
run: npm install | |
- name: Lint | |
run: npx grunt lint | |
- name: Coverage and test | |
run: xvfb-run npx grunt coverage test-examples test-browser | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |