Merge pull request #1541 from hedgedoc/maint/ci_updates

This commit is contained in:
David Mehren 2021-08-14 23:31:02 +02:00 committed by GitHub
commit 8eb4e7e6e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: |