mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 22:35:50 -04:00
Use safer node_modules cache (#803)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
e8ccd44ff7
commit
590218c7c4
3 changed files with 41 additions and 14 deletions
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
|
@ -20,17 +20,23 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
- name: Cache node_modules
|
- name: Cache node_modules
|
||||||
uses: actions/cache@v2.1.3
|
uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
key: node_modules
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
- name: Set up NodeJS
|
- name: Set up NodeJS
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install
|
run: yarn install --frozen-lockfile --prefer-offline
|
||||||
- name: Test Project
|
- name: Test Project
|
||||||
run: yarn test
|
run: yarn test
|
||||||
- name: Build project
|
- name: Build project
|
||||||
|
|
24
.github/workflows/e2e.yml
vendored
24
.github/workflows/e2e.yml
vendored
|
@ -16,20 +16,32 @@ jobs:
|
||||||
name: build frontend
|
name: build frontend
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
uses: actions/cache@v2.1.3
|
uses: actions/cache@v2.1.3
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: build
|
key: build
|
||||||
|
|
||||||
- name: Cache node_modules
|
- name: Cache node_modules
|
||||||
uses: actions/cache@v2.1.3
|
uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
key: node_modules
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
- uses: actions/setup-node@v1
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
|
- name: Set up NodeJS
|
||||||
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: 14
|
||||||
- run: yarn install
|
|
||||||
|
- run: yarn install --frozen-lockfile --prefer-offline
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
|
|
17
.github/workflows/lint.yml
vendored
17
.github/workflows/lint.yml
vendored
|
@ -17,16 +17,25 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- name: Cache node_modules
|
- name: Cache node_modules
|
||||||
uses: actions/cache@v2.1.3
|
uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
key: node_modules
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Set up NodeJS
|
- name: Set up NodeJS
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install
|
run: yarn install --frozen-lockfile --prefer-offline
|
||||||
- name: Lint code
|
- name: Lint code
|
||||||
run: yarn lint
|
run: yarn lint
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue