2021-01-06 20:36:07 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2021-01-05 22:02:12 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
|
|
|
|
name: Nest.JS CI
|
|
|
|
|
|
|
|
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
|
|
|
|
2021-01-05 22:02:12 +00:00
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
command:
|
|
|
|
- yarn run lint
|
2021-02-16 09:28:55 +00:00
|
|
|
- yarn run format
|
2021-01-05 22:02:12 +00:00
|
|
|
steps:
|
2022-03-05 09:36:39 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-06 20:05:40 +00:00
|
|
|
- name: Use Node.js ${{ env.NODEJS_VERSION }}
|
2022-02-26 11:19:26 +00:00
|
|
|
uses: actions/setup-node@v3
|
2021-01-05 22:02:12 +00:00
|
|
|
with:
|
2022-03-06 20:05:40 +00:00
|
|
|
node-version: ${{ env.NODEJS_VERSION }}
|
2021-09-05 16:14:18 +00:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
2021-01-05 22:02:12 +00:00
|
|
|
- run: ${{matrix.command}}
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-04-26 12:31:58 +00:00
|
|
|
node-version: [12.x, 14.x, 16.x, 18.x ]
|
2021-01-05 22:02:12 +00:00
|
|
|
steps:
|
2022-03-05 09:36:39 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-05 22:02:12 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2022-02-26 11:19:26 +00:00
|
|
|
uses: actions/setup-node@v3
|
2021-01-05 22:02:12 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2021-09-05 16:14:18 +00:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
2021-01-05 22:02:12 +00:00
|
|
|
- run: yarn run build
|
|
|
|
|
|
|
|
integration-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-05 09:36:39 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-06 12:17:30 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-03-06 20:05:40 +00:00
|
|
|
- name: Use Node.js ${{ env.NODEJS_VERSION }}
|
2022-02-26 11:19:26 +00:00
|
|
|
uses: actions/setup-node@v3
|
2021-01-05 22:02:12 +00:00
|
|
|
with:
|
2022-03-06 20:05:40 +00:00
|
|
|
node-version: ${{ env.NODEJS_VERSION }}
|
2021-09-05 16:14:18 +00:00
|
|
|
cache: 'yarn'
|
|
|
|
- run: yarn install --immutable
|
2021-01-06 11:38:33 +00:00
|
|
|
- run: yarn run test:cov
|
2022-04-10 00:02:23 +00:00
|
|
|
- uses: codecov/codecov-action@v3
|
2021-01-06 11:38:33 +00:00
|
|
|
with:
|
|
|
|
directory: coverage
|
|
|
|
flags: integration-tests
|