mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 22:54:21 -05:00
ad3dc27e3f
Signed-off-by: Renovate Bot <bot@renovateapp.com>
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
name: Run tests & build
|
|
|
|
on:
|
|
push:
|
|
branches: [ develop ]
|
|
pull_request:
|
|
branches: [ develop ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node: [ '16', '18' ] # Are you changing this? Don't forget to update the min. and recommended node version in getting-started.md!
|
|
include:
|
|
- node: '18'
|
|
coverage: true
|
|
name: Test and build with NodeJS ${{ matrix.node }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
|
|
|
- name: Setup node
|
|
uses: ./.github/actions/setup-node
|
|
with:
|
|
NODEJS_VERSION: ${{ matrix.node }}
|
|
|
|
- name: Build project
|
|
run: yarn turbo run build
|
|
shell: bash
|
|
env:
|
|
NODEJS_VERSION: ${{ matrix.node }}
|
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
TURBO_API: ${{ vars.TURBO_API }}
|
|
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
|
|
|
- name: Test Project
|
|
run: yarn turbo run test:ci
|
|
shell: bash
|
|
env:
|
|
NODEJS_VERSION: ${{ matrix.node }}
|
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
TURBO_API: ${{ vars.TURBO_API }}
|
|
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
|
|
|
- name: Upload coverage
|
|
if: "${{ matrix.coverage == true }}"
|
|
uses: codecov/codecov-action@40a12dcee2df644d47232dde008099a3e9e4f865 # v3.1.2
|
|
with:
|
|
directory: backend/coverage
|
|
flags: integration-tests
|