Skip to content

Commit

Permalink
Added Github Actions workflow to run npm test script on push to git
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadJaziraly committed Dec 26, 2024
1 parent a9830c1 commit 5777256
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 33 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Lint and Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8, 12, 14]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable

- name: Configure Chrome Sandbox
run: |
sudo chown root:root /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox
sudo chmod 4755 /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox
- name: Install dependencies
run: npm install

- name: Run ESLint and tests
run: npm test
env:
CHROME_BIN: chrome
CHROME_FLAGS: --no-sandbox --headless --disable-gpu
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

0 comments on commit 5777256

Please sign in to comment.