Merge pull request #2365 from MichMich/ci-test

Replace Travis with Github Actions
This commit is contained in:
Michael Teeuw 2020-12-21 10:24:26 +01:00 committed by GitHub
commit d0aeb90f0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 25 deletions

35
.github/workflows/node-ci.js.yml vendored Normal file
View File

@ -0,0 +1,35 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: MagicMirror Automated Testing
on:
push:
branches: [ master, develop, ci-test ]
pull_request:
branches: [ master, develop, ci-test ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: |
Xvfb :99 -screen 0 1024x768x16 &
export DISPLAY=:99
npm install
npm run test:prettier
npm run test:js
npm run test:css
npm run test:e2e
npm run test:unit

View File

@ -2,3 +2,4 @@ package-lock.json
/config/**/*
/vendor/**/*
!/vendor/vendor.js
.github/**/*

View File

@ -1,25 +0,0 @@
dist: trusty
language: node_js
node_js:
- 10
- lts/*
- node
before_install:
- npm i -g npm
before_script:
- yarn danger ci
- "export DISPLAY=:99.0"
- "export ELECTRON_DISABLE_SANDBOX=1"
- "sh -e /etc/init.d/xvfb start"
- sleep 5
script:
- npm run test:prettier
- npm run test:js
- npm run test:css
- npm run test:e2e
- npm run test:unit
after_script:
- npm list
cache:
directories:
- node_modules