Add GitHub Workflows

This commit is contained in:
Alexey
2022-01-10 22:31:34 +03:00
parent 5147eca76f
commit 723dd48942
2 changed files with 39 additions and 2 deletions

37
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Test
on:
push:
branches:
- ${{ github.event.repository.default_branch }}
pull_request:
branches:
- ${{ github.event.repository.default_branch }}
paths:
- '*.js'
- 'package.json'
jobs:
tests:
env:
NPM_CONFIG_PROGRESS: "false"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 6
- run: npm install karma-sauce-launcher
- run: sh -e /etc/init.d/xvfb start
env:
DISPLAY: ':99.0'
- run: npm test
- run: ./node_modules/.bin/karma start karma.conf-sauce.js
env:
SAUCE_USERNAME: ${{ secrets.SauceUsername }}
SAUCE_ACCESS_KEY: ${{ secrets.SauceAccessKey }}
BUILD_NUMBER: ${{ GITHUB_RUN_NUMBER }}
BUILD_ID: ${{ GITHUB_RUN_ID }}
JOB_NUMBER: ${{ GITHUB_JOB }}