diff --git a/.github/workflows/node-ci.js.yml b/.github/workflows/node-ci.js.yml new file mode 100644 index 00000000..5f916bcf --- /dev/null +++ b/.github/workflows/node-ci.js.yml @@ -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 diff --git a/.prettierignore b/.prettierignore index 3b87fcd2..b829fa7c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,3 +2,4 @@ package-lock.json /config/**/* /vendor/**/* !/vendor/vendor.js +.github/**/* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b2c4ae0f..00000000 --- a/.travis.yml +++ /dev/null @@ -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