Update ci.yml

This commit is contained in:
Niklas von Hertzen 2020-07-28 23:47:14 +08:00 committed by GitHub
parent e083e229c9
commit df44c86f68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,3 @@
# This is a basic workflow to help you get started with Actions
name: CI
on:
@ -58,3 +56,47 @@ jobs:
run: npm run lint
- name: Unit tests
run: npm run unittest
browser-test:
strategy:
matrix:
config:
- os: ubuntu-latest
name: Browser Tests Linux Firefox Stable
targetBrowser: Firefox_Stable
xvfb: true
- os: windows-latest
name: Windows Internet Explorer 11
targetBrowser: IE_11
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.name }}
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Npm install
run: npm ci
- name: Download library
uses: actions/download-artifact@v2
with:
name: dist
- name: Download test-runner
uses: actions/download-artifact@v2
with:
name: build
- name: Run browser tests
if: ${{ matrix.config.xvfb !== true }}
run: npm run karma
- name: Start Xvfb
if: ${{ matrix.config.xvfb === true }}
run: Xvfb :99 &
- name: Run browser tests
if: ${{ matrix.config.xvfb === true }}
run: DISPLAY=:99 npm run karma
- name: Upload screenshots
uses: actions/upload-artifact@v2
with:
name: ReftestResults
path: tmp/reftests