Switched testing to GitHub Actions

no issue
This commit is contained in:
Daniel Lockyer 2020-02-14 10:35:02 +00:00
parent 1a61b500d9
commit 05f4e303e2
3 changed files with 30 additions and 32 deletions

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

@ -0,0 +1,28 @@
name: Test Suite
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
browser: [ 'Firefox', 'Chrome' ]
name: ${{ matrix.browser }}
env:
MOZ_HEADLESS: 1
JOBS: 1
CI: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
- run: yarn
- run: yarn lint:js
- run: yarn test
env:
BROWSER: ${{ matrix.browser }}

View File

@ -1,23 +0,0 @@
dist: xenial
language: node_js
node_js:
- '10'
- '12'
cache: yarn
env:
global:
- MOZ_HEADLESS=1
- JOBS=1
# Don't run builds for renovate PRs
if: NOT head_branch =~ ^renovate
addons:
firefox: latest
chrome: stable
install:
- yarn
script:
- yarn run lint:js && yarn run test
after_failure: |
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
curl -X POST --data-urlencode "payload={\"attachments\": [{\"color\": \"danger\", \"fallback\": \"Build Failure: $TRAVIS_JOB_WEB_URL\", \"title\": \"Build Failure\", \"text\": \"$TRAVIS_JOB_WEB_URL\"}]}" $SLACK_URL
fi

View File

@ -1,18 +1,11 @@
/* eslint-env node */
/* eslint-disable camelcase */
const isCronBuild = process.env.TRAVIS_EVENT_TYPE === 'cron';
let launch_in_ci = ['Chrome'];
// we only test Firefox in nightly builds on CI to keep push/PR build times lower
if (isCronBuild) {
launch_in_ci.push('Firefox');
}
let launch_in_ci = [process.env.BROWSER || 'Chrome'];
module.exports = {
framework: 'mocha',
browser_disconnect_timeout: 30,
browser_disconnect_timeout: 60,
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
parallel: process.env.EMBER_EXAM_SPLIT_COUNT || 1,