2022-03-06 17:56:46 +00:00
|
|
|
# SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
name: E2E Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ develop ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ develop ]
|
|
|
|
|
2022-03-06 20:05:40 +00:00
|
|
|
env:
|
2022-04-26 12:31:58 +00:00
|
|
|
NODEJS_VERSION: 18
|
2022-03-06 20:05:40 +00:00
|
|
|
|
|
|
|
|
2022-03-06 17:56:46 +00:00
|
|
|
jobs:
|
|
|
|
sqlite: # This run also collects coverage
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-03-06 20:05:40 +00:00
|
|
|
- name: Use Node.js ${{ env.NODEJS_VERSION }}
|
2022-03-06 17:56:46 +00:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2022-03-06 20:05:40 +00:00
|
|
|
node-version: ${{ env.NODEJS_VERSION }}
|
2022-03-06 17:56:46 +00:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
|
|
|
- run: yarn run test:e2e:cov
|
2022-04-10 00:02:23 +00:00
|
|
|
- uses: codecov/codecov-action@v3
|
2022-03-06 17:56:46 +00:00
|
|
|
with:
|
|
|
|
directory: coverage-e2e
|
|
|
|
flags: e2e-tests
|
|
|
|
|
|
|
|
mariadb:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
mariadb:
|
|
|
|
image: mariadb
|
|
|
|
env:
|
|
|
|
MYSQL_USER: hedgedoc
|
|
|
|
MYSQL_PASSWORD: hedgedoc
|
|
|
|
MYSQL_DATABASE: hedgedoc
|
|
|
|
MYSQL_ROOT_PASSWORD: hedgedoc
|
|
|
|
options: --health-cmd "mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5
|
|
|
|
ports:
|
|
|
|
- 3306:3306
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-03-06 20:05:40 +00:00
|
|
|
- name: Use Node.js ${{ env.NODEJS_VERSION }}
|
2022-03-06 17:56:46 +00:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2022-03-06 20:05:40 +00:00
|
|
|
node-version: ${{ env.NODEJS_VERSION }}
|
2022-03-06 17:56:46 +00:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
|
|
|
- run: yarn run test:e2e
|
|
|
|
env:
|
|
|
|
HEDGEDOC_TEST_DB_TYPE: mariadb
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres
|
|
|
|
env:
|
|
|
|
POSTGRES_PASSWORD: hedgedoc
|
|
|
|
POSTGRES_USER: hedgedoc
|
|
|
|
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-03-06 20:05:40 +00:00
|
|
|
- name: Use Node.js ${{ env.NODEJS_VERSION }}
|
2022-03-06 17:56:46 +00:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2022-03-06 20:05:40 +00:00
|
|
|
node-version: ${{ env.NODEJS_VERSION }}
|
2022-03-06 17:56:46 +00:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
|
|
|
- run: yarn run test:e2e
|
|
|
|
env:
|
|
|
|
HEDGEDOC_TEST_DB_TYPE: postgres
|