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 - sudo apt install -y jq && yarn run jsonlint
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js 14 - name: Use Node.js 16
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 14 node-version: 16
- name: Get yarn cache directory path cache: yarn
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-
- run: yarn --frozen-lockfile --prefer-offline - run: yarn --frozen-lockfile --prefer-offline
- run: ${{matrix.command}} - run: ${{matrix.command}}
dynamic-tests: dynamic-tests:
@ -39,23 +30,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
node-version: [12.x, 14.x, 15.x, 16.x] node-version: [12, 14, 16]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path cache: yarn
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-
- run: yarn --frozen-lockfile --prefer-offline - run: yarn --frozen-lockfile --prefer-offline
- run: yarn run mocha-suite - run: yarn run mocha-suite
production-build: production-build:
@ -63,27 +45,18 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
node-version: [12.x, 14.x, 15.x, 16.x] node-version: [12, 14, 16]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path cache: yarn
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-
- run: yarn --frozen-lockfile --prefer-offline - run: yarn --frozen-lockfile --prefer-offline
- run: yarn run build - run: yarn run build
- uses: actions/upload-artifact@v2 - 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: with:
name: Prebuild with Node.js ${{ matrix.node-version }} name: Prebuild with Node.js ${{ matrix.node-version }}
path: | path: |