mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-19 04:01:49 +00:00
Merge pull request #1541 from hedgedoc/maint/ci_updates
This commit is contained in:
commit
8eb4e7e6e8
1 changed files with 8 additions and 35 deletions
43
.github/workflows/node.js.yml
vendored
43
.github/workflows/node.js.yml
vendored
|
@ -18,20 +18,11 @@ jobs:
|
|||
- sudo apt install -y jq && yarn run jsonlint
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
node-version: 16
|
||||
cache: yarn
|
||||
- run: yarn --frozen-lockfile --prefer-offline
|
||||
- run: ${{matrix.command}}
|
||||
dynamic-tests:
|
||||
|
@ -39,23 +30,14 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x, 15.x, 16.x]
|
||||
node-version: [12, 14, 16]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
- run: yarn --frozen-lockfile --prefer-offline
|
||||
- run: yarn run mocha-suite
|
||||
production-build:
|
||||
|
@ -63,27 +45,18 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x, 15.x, 16.x]
|
||||
node-version: [12, 14, 16]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
- run: yarn --frozen-lockfile --prefer-offline
|
||||
- run: yarn run build
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: github.ref == 'refs/heads/master' && matrix.node-version == '14.x'
|
||||
if: github.ref == 'refs/heads/master' && matrix.node-version == '16'
|
||||
with:
|
||||
name: Prebuild with Node.js ${{ matrix.node-version }}
|
||||
path: |
|
||||
|
|
Loading…
Reference in a new issue