mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 09:46:30 -05:00
CI: Use immutable flag and built-in caching
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
921500efe9
commit
692300cdc9
1 changed files with 8 additions and 44 deletions
52
.github/workflows/nest.js.yml
vendored
52
.github/workflows/nest.js.yml
vendored
|
@ -25,17 +25,8 @@ jobs:
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
- name: Get yarn cache directory path
|
cache: 'yarn'
|
||||||
id: yarn-cache-dir-path
|
- run: yarn install --immutable
|
||||||
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: ${{matrix.command}}
|
- run: ${{matrix.command}}
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -48,17 +39,8 @@ 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: yarn install --immutable
|
||||||
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 run build
|
- run: yarn run build
|
||||||
|
|
||||||
integration-tests:
|
integration-tests:
|
||||||
|
@ -71,17 +53,8 @@ jobs:
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
- name: Get yarn cache directory path
|
cache: 'yarn'
|
||||||
id: yarn-cache-dir-path
|
- run: yarn install --immutable
|
||||||
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 run test:cov
|
- run: yarn run test:cov
|
||||||
- uses: codecov/codecov-action@v2
|
- uses: codecov/codecov-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -98,17 +71,8 @@ jobs:
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
- name: Get yarn cache directory path
|
cache: 'yarn'
|
||||||
id: yarn-cache-dir-path
|
- run: yarn install --immutable
|
||||||
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 run test:e2e:cov
|
- run: yarn run test:e2e:cov
|
||||||
- uses: codecov/codecov-action@v2
|
- uses: codecov/codecov-action@v2
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue