2021-01-06 15:36:07 -05:00
|
|
|
# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2021-01-05 17:02:12 -05:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
|
|
|
|
name: Nest.JS CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ develop ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ develop ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
command:
|
|
|
|
- yarn run lint
|
2021-02-16 04:28:55 -05:00
|
|
|
- yarn run format
|
2021-01-05 17:02:12 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-04-22 13:08:43 -04:00
|
|
|
- name: Use Node.js 16
|
2021-01-06 17:40:22 -05:00
|
|
|
uses: actions/setup-node@v2
|
2021-01-05 17:02:12 -05:00
|
|
|
with:
|
2021-04-22 13:08:43 -04:00
|
|
|
node-version: 16
|
2021-09-05 12:14:18 -04:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
2021-01-05 17:02:12 -05:00
|
|
|
- run: ${{matrix.command}}
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-08-01 11:58:14 -04:00
|
|
|
node-version: [12.x, 14.x, 16.x ]
|
2021-01-05 17:02:12 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2021-01-06 17:40:22 -05:00
|
|
|
uses: actions/setup-node@v2
|
2021-01-05 17:02:12 -05:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2021-09-05 12:14:18 -04:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
2021-01-05 17:02:12 -05:00
|
|
|
- run: yarn run build
|
|
|
|
|
|
|
|
integration-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-01-06 07:17:30 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-04-22 13:08:43 -04:00
|
|
|
- name: Use Node.js 16
|
2021-01-06 17:40:22 -05:00
|
|
|
uses: actions/setup-node@v2
|
2021-01-05 17:02:12 -05:00
|
|
|
with:
|
2021-04-22 13:08:43 -04:00
|
|
|
node-version: 16
|
2021-09-05 12:14:18 -04:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
2021-01-06 06:38:33 -05:00
|
|
|
- run: yarn run test:cov
|
2021-07-19 14:06:14 -04:00
|
|
|
- uses: codecov/codecov-action@v2
|
2021-01-06 06:38:33 -05:00
|
|
|
with:
|
|
|
|
directory: coverage
|
|
|
|
flags: integration-tests
|
2021-01-05 17:02:12 -05:00
|
|
|
|
|
|
|
e2e-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-01-06 07:17:30 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-04-22 13:08:43 -04:00
|
|
|
- name: Use Node.js 16
|
2021-01-06 17:40:22 -05:00
|
|
|
uses: actions/setup-node@v2
|
2021-01-05 17:02:12 -05:00
|
|
|
with:
|
2021-04-22 13:08:43 -04:00
|
|
|
node-version: 16
|
2021-09-05 12:14:18 -04:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
2021-01-06 06:38:33 -05:00
|
|
|
- run: yarn run test:e2e:cov
|
2021-07-19 14:06:14 -04:00
|
|
|
- uses: codecov/codecov-action@v2
|
2021-01-06 06:38:33 -05:00
|
|
|
with:
|
|
|
|
directory: coverage-e2e
|
|
|
|
flags: e2e-tests
|