mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 09:46:30 -05:00
74625fc1e0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
43 lines
1 KiB
YAML
43 lines
1 KiB
YAML
name: Build & run tests
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node: ['16', '18', '20']
|
|
name: Node ${{ matrix.node }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
with:
|
|
NODEJS_VERSION: ${{ matrix.node }}
|
|
|
|
- name: Build project
|
|
run: yarn run build
|
|
|
|
- name: Run tests
|
|
run: yarn run mocha-suite
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v3
|
|
if: github.ref == 'refs/heads/master' && matrix.node-version == '16'
|
|
with:
|
|
name: Prebuild with Node.js ${{ matrix.node-version }}
|
|
path: |
|
|
**
|
|
!.git
|
|
!node_modules
|