Remove browserstack integration

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-04-11 22:34:53 +02:00
parent d86e246974
commit 36ac8f113c
5 changed files with 54 additions and 463 deletions

View file

@ -11,25 +11,23 @@ on:
branches: [main]
jobs:
e2e:
build-frontend:
runs-on: ubuntu-latest
name: Perform E2E Tests on BrowserStack
name: Build test build of frontend
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Get branch and commit
id: gitinfo
run: |
if [ -n "${{ github.event.pull_request.head.sha }}" ]; \
then echo "::set-output name=shapr::$(echo ${{ github.event.pull_request.head.sha }} | cut -c -7) - #${{ github.event.pull_request.number }}"; \
else echo "::set-output name=shapr::$(echo ${{ github.sha }} | cut -c -7)"; fi
echo "::set-output name=branch::${GITHUB_HEAD_REF:-main}"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache build
uses: actions/cache@v2.1.3
with:
path: build
key: build
- name: Cache node_modules
uses: actions/cache@v2
id: yarn-cache
@ -44,40 +42,41 @@ jobs:
with:
node-version: 14
- name: Install sponge utility
run: sudo apt-get install -yqq moreutils
- name: Install dependencies
run: yarn install --frozen-lockfile --prefer-offline
- name: Build test production build
run: yarn build:test
- name: Start http server
run: yarn serve:build &
- name: Set BrowserStack config values
run: jq '.run_settings.build_name = "${{ steps.gitinfo.outputs.shapr }} - ${{ steps.gitinfo.outputs.branch }}"' browserstack.json | sponge browserstack.json
- name: Set up BrowserStack environment
uses: 'browserstack/github-actions/setup-env@master'
- uses: actions/upload-artifact@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
name: build
path: build
- name: Set up BrowserStack local connection
uses: 'browserstack/github-actions/setup-local@master'
end2end:
name: Perform E2E Test in ${{ matrix.browser }}
needs: build-frontend
runs-on: ubuntu-latest
strategy:
matrix:
browser: [ 'chrome', 'firefox' ]
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Download built frontend
uses: actions/download-artifact@master
with:
local-testing: start
local-identifier: random
name: build
path: build
- name: Enable cypress videos
run: jq '.video = true' cypress.json | sponge cypress.json
- name: Run BrowserStack Tests
run: yarn run cy:browserstack
- name: Stop BrowserStack local connection
uses: 'browserstack/github-actions/setup-local@master'
- uses: cypress-io/github-action@v2
with:
local-testing: stop
browser: ${{ matrix.browser }}
start: 'yarn serve:build'
- uses: actions/upload-artifact@master
if: always()
with:
name: screenshots
path: cypress/screenshots