From df44c86f68c1fda56fe3ca76ac03ba843b143204 Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Tue, 28 Jul 2020 23:47:14 +0800 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40edac5..402f582 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 +