mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-24 18:56:32 -05:00
6e3c4ae1a9
Signed-off-by: Renovate Bot <bot@renovateapp.com>
65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
name: Node.js CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
static-tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
command:
|
|
- yarn run eslint
|
|
- yarn run markdownlint
|
|
- shellcheck bin/heroku bin/setup
|
|
- sudo apt install -y jq && yarn run jsonlint
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js 16
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: yarn
|
|
- run: yarn --frozen-lockfile --prefer-offline
|
|
- run: ${{matrix.command}}
|
|
dynamic-tests:
|
|
needs: static-tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [12, 14, 16]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: yarn
|
|
- run: yarn --frozen-lockfile --prefer-offline
|
|
- run: yarn run mocha-suite
|
|
production-build:
|
|
needs: dynamic-tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [12, 14, 16]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: yarn
|
|
- run: yarn --frozen-lockfile --prefer-offline
|
|
- run: yarn run build
|
|
- 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
|