hedgedoc/.github/workflows/nest.js.yml
David Mehren be3a4e2c88
CI: Test and build with Node 17
Signed-off-by: David Mehren <git@herrmehren.de>
2021-11-11 19:39:22 +01:00

80 lines
1.9 KiB
YAML

# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
#
# 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
- yarn run format
steps:
- uses: actions/checkout@v2
- name: Use Node.js 17
uses: actions/setup-node@v2
with:
node-version: 17
cache: 'yarn'
- run: yarn install --immutable
- run: ${{matrix.command}}
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 17.x ]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run build
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js 17
uses: actions/setup-node@v2
with:
node-version: 17
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:cov
- uses: codecov/codecov-action@v2
with:
directory: coverage
flags: integration-tests
e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js 17
uses: actions/setup-node@v2
with:
node-version: 17
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:e2e:cov
- uses: codecov/codecov-action@v2
with:
directory: coverage-e2e
flags: e2e-tests