Skip to content

Commit 8ec8b27

Browse files
Added Github Actions workflow to run npm test script on push to git
1 parent 3be32e5 commit 8ec8b27

File tree

2 files changed

+42
-33
lines changed

2 files changed

+42
-33
lines changed

.github/workflows/ci.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Lint and Test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [14, 16, 18]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Setup Chrome
26+
uses: browser-actions/setup-chrome@latest
27+
with:
28+
chrome-version: stable
29+
30+
- name: Configure Chrome Sandbox
31+
run: |
32+
sudo chown root:root /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox
33+
sudo chmod 4755 /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox
34+
35+
- name: Install dependencies
36+
run: npm install
37+
38+
- name: Run ESLint and tests
39+
run: npm test
40+
env:
41+
CHROME_BIN: chrome
42+
CHROME_FLAGS: --no-sandbox --headless --disable-gpu

.travis.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)