chore: update workflow file
This commit is contained in:
18
.github/workflows/build-and-test.yml
vendored
18
.github/workflows/build-and-test.yml
vendored
@@ -10,6 +10,8 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
env:
|
||||||
|
PNPM_CACHE_FOLDER: .pnpm-store
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
@@ -21,12 +23,6 @@ jobs:
|
|||||||
node: [14]
|
node: [14]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: TurboRepo local server
|
|
||||||
uses: felixmosh/turborepo-gh-artifacts@v1
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}
|
|
||||||
|
|
||||||
- name: Checkout 🛎
|
- name: Checkout 🛎
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
|
|
||||||
@@ -36,22 +32,20 @@ jobs:
|
|||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
- uses: pnpm/action-setup@v2.2.2
|
||||||
name: Install pnpm
|
name: Install pnpm
|
||||||
id: pnpm-install
|
|
||||||
with:
|
with:
|
||||||
version: 7
|
version: 7
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Get pnpm cache directory path 🛠
|
- name: Setup pnpm config 🏗
|
||||||
id: pnpm-cache-dir-path
|
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
|
||||||
run: echo "::set-output name=dir::$(pnpm cache dir)"
|
|
||||||
|
|
||||||
- name: Cache node_modules 📦
|
- name: Cache node_modules 📦
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`)
|
id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`)
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
|
path: $PNPM_CACHE_FOLDER
|
||||||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }}
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pnpm-
|
${{ runner.os }}-pnpm-
|
||||||
|
|||||||
Reference in New Issue
Block a user