From 7faed0d27e96000663e2432129a7ca450bb836cc Mon Sep 17 00:00:00 2001 From: orangemug Date: Sun, 24 May 2020 12:56:52 +0100 Subject: [PATCH] Added firefox tests and fixed docker deploy --- .github/workflows/ci.yml | 41 +++++++++++++++++++++++++++++++++++- .github/workflows/deploy.yml | 2 +- config/wdio.conf.js | 10 +++++---- 3 files changed, 47 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d273a2b..8548a27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,6 +144,45 @@ jobs: - name: artifacts/screenshots uses: actions/upload-artifact@v1 with: - name: screenshots + name: screenshots-chrome + path: build/screenshots + + # build and test the editor in standalone-firefox + test_selenium_standalone_firefox: + name: "test/standalone-firefox (${{ matrix.os }})" + runs-on: ${{ matrix.os }} + + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + node-version: [10] + + container: + image: node:${{ matrix.node-version }} + options: --network-alias testhost + + services: + selenium: + image: selenium/standalone-firefox:3.141.59 + ports: + - 4444:4444 + + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - run: npm install + - run: BROWSER=firefox TEST_NETWORK=testhost DOCKER_HOST=selenium npm test + - name: artifacts/screenshots + uses: actions/upload-artifact@v1 + with: + name: screenshots-firefox path: build/screenshots diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bb103b2..ee8b519 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ jobs: name: deploy/docker runs-on: ${{ matrix.os }} - if: ${{ github.event_name == 'push' && github.ref == 'master' }} + if: ${{ github.event_name == 'push' }} strategy: fail-fast: false diff --git a/config/wdio.conf.js b/config/wdio.conf.js index 1b9290e..2df58d9 100644 --- a/config/wdio.conf.js +++ b/config/wdio.conf.js @@ -16,10 +16,12 @@ exports.config = { './test/functional/index.js' ], maxInstances: 10, - capabilities: [{ - maxInstances: 5, - browserName: 'chrome', - }], + capabilities: [ + { + maxInstances: 5, + browserName: (process.env.BROWSER || 'chrome'), + } + ], logLevel: 'info', bail: 0, screenshotPath: SCREENSHOT_PATH,