Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get GH Actions on par with Travis CI testing #583

Merged
merged 7 commits into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 85 additions & 10 deletions .github/workflows/build+test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,105 @@ on:
- pull_request

jobs:
build:
runs-on: ubuntu-latest
test_node:
runs-on: ubuntu-20.04
strategy:
matrix:
node: [ '14' ]
name: Node ${{ matrix.node }} build
name: Test on node v${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-node${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
path: ~/.cache/yarn/
key: ${{ runner.os }}-yarn-node${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn
- name: Lint
run: yarn lint
- name: Lint Types
run: yarn lint-types
- name: Build
run: yarn gulp build-web # build-node was already executed during Install step
- name: Test Node
run: yarn test-node
- name: Test Browser
run: yarn test-browser

test_chrome:
runs-on: ubuntu-20.04
strategy:
matrix:
chrome: [ 'stable', 'beta' ]
name: Test on Chrome (${{ matrix.chrome }})
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: ${{ matrix.chrome }}
- uses: actions/cache@v2
with:
path: ~/.cache/yarn/
key: ${{ runner.os }}-yarn-node14-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn
- name: Build
run: yarn gulp build-web
- run: sudo apt-get install xvfb
- name: Get Version
run: chrome --version
- name: Test
run: KARMA_BROWSERS=Chrome xvfb-run --auto-servernum yarn test-browser

test_firefox:
runs-on: ubuntu-20.04
strategy:
matrix:
firefox: [ 'latest', 'latest-esr', 'latest-beta' ]
name: Test on Firefox (${{ matrix.firefox }})
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: browser-actions/setup-firefox@v0.0.0
with:
firefox-version: ${{ matrix.firefox }}
- uses: actions/cache@v2
with:
path: ~/.cache/yarn/
key: ${{ runner.os }}-yarn-node14-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn
- name: Build
run: yarn gulp build-web
- run: sudo apt-get install xvfb
- name: Get Version
run: firefox --version
- name: Test
run: KARMA_BROWSERS=Firefox xvfb-run --auto-servernum yarn test-browser

test_esm:
runs-on: ubuntu-20.04
strategy:
matrix:
browser: [ 'Chrome', 'Firefox' ]
name: Test ESM (${{ matrix.browser }})
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/cache@v2
with:
path: ~/.cache/yarn/
key: ${{ runner.os }}-yarn-node14-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn
- name: Build
run: yarn gulp build-web-module
- run: sudo apt-get install xvfb
- name: Test
run: USE_ESM=1 KARMA_BROWSERS=${{ matrix.browser }} xvfb-run --auto-servernum yarn test-browser
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ const RELEASE_ADDONS = [
gulp.task('eslint', function () {
const eslint = require('gulp-eslint');
return gulp.src(sources.all)
.pipe(eslint({quiet: true}))
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
Expand Down