mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
CI: Migrate to integrated dependency cache
Since https://github.com/actions/setup-node/releases/tag/v2.2.0 the setup-node action supports caching dependencies natively. We can therefore simplify our CI config. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
acf2d643f9
commit
313ed46888
1 changed files with 3 additions and 30 deletions
33
.github/workflows/node.js.yml
vendored
33
.github/workflows/node.js.yml
vendored
|
@ -22,16 +22,7 @@ jobs:
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
- 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:
|
||||||
|
@ -46,16 +37,7 @@ jobs:
|
||||||
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:
|
||||||
|
@ -70,16 +52,7 @@ jobs:
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue