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

chore: switch from travis to github actions for ci #989

Merged
merged 4 commits into from
Nov 10, 2020
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
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ci

on: [push, pull_request]

jobs:
ci:
env:
BROWSER_STACK_USERNAME: ${{ secrets.BROWSER_STACK_USERNAME }}
BROWSER_STACK_ACCESS_KEY: ${{ secrets.BROWSER_STACK_ACCESS_KEY }}
runs-on: ${{ matrix.os }}
strategy:
# TODO: test IE 11, Legacy Edge, and New Edge on windows-latest
# test Safari on macos-latest
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.npm
**/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
${{ runner.os }}-

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
shell: bash
id: nvm

- name: Install ffmpeg/pulseaudio for firefox on linux w/o browserstack
run: sudo apt-get install ffmpeg pulseaudio
if: ${{ startsWith(matrix.os, 'ubuntu') && !env.BROWSER_STACK_USERNAME }}

- name: start pulseaudio for firefox on linux w/o browserstack
run: pulseaudio -D
if: ${{ startsWith(matrix.os, 'ubuntu') && !env.BROWSER_STACK_USERNAME }}

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- run: npm i --prefer-offline --no-audit

# run safari on macos
- name: Run Mac test
run: npm run test -- --browsers Safari
if: ${{ startsWith(matrix.os, 'macos') }}

# only run ie 11 on windows
- name: Run Windows test
run: npm run test -- --browsers IE
if: ${{ startsWith(matrix.os, 'windows') }}

# run chrome/firefox or browserstack in linux
- name: Run linux test
uses: GabrielBB/xvfb-action@v1
with:
run: npm test
if: ${{ startsWith(matrix.os, 'ubuntu') }}

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/dubnium
gkatsev marked this conversation as resolved.
Show resolved Hide resolved
10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was switched to a number because actions/setup-node requires a number and can't use lts/dubnium. While I still like the signal that we use lts here, having a single source of truth for the node version we're on is nice.

20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

Loading