hedgedoc/.github/workflows/e2e.yml
Tilman Vatteroth 28600d6508
Change copyright year from 2020 to 2021 (#917)
* Change copyright year from 2020 to 2021

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Change copyright year in jetbrains copyright template

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 21:37:59 +01:00

71 lines
1.9 KiB
YAML

# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
#
# SPDX-License-Identifier: AGPL-3.0-only
name: e2e
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
e2e:
runs-on: ubuntu-latest
name: Perform E2E Tests on BrowserStack
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up NodeJS
uses: actions/setup-node@v2
with:
node-version: 14
- 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 up BrowserStack environment
uses: 'browserstack/github-actions/setup-env@master'
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: Set up BrowserStack local connection
uses: 'browserstack/github-actions/setup-local@master'
with:
local-testing: start
local-identifier: random
- name: enable cypress videos
run: |
sudo apt-get install moreutils -yqq
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'
with:
local-testing: stop