Skip to content

Commit

Permalink
Apply pnpm to all CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuanx committed Mar 1, 2024
1 parent 895fe6a commit fa6b0ee
Showing 1 changed file with 48 additions and 30 deletions.
78 changes: 48 additions & 30 deletions .github/workflows/main-push-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,27 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- uses: actions/cache@v3
name: Set up cache
- name: Setup pnpm
uses: pnpm/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
version: 8
run_install: false

- name: Set up node
uses: actions/setup-node@v3
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
node-version: '20'
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm i
run: pnpm i --frozen-lockfile

- name: Build application
run: npm run build
Expand All @@ -83,21 +89,27 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- uses: actions/cache@v3
name: Set up cache
- name: Setup pnpm
uses: pnpm/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
version: 8
run_install: false

- name: Set up node
uses: actions/setup-node@v3
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
node-version: '20'
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm i
run: pnpm i --frozen-lockfile

- name: Build application
run: npm run build
Expand All @@ -114,21 +126,27 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/cache@v3
name: Set up cache
- name: Setup pnpm
uses: pnpm/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
version: 8
run_install: false

- name: Set up node
uses: actions/setup-node@v3
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
node-version: '20'
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm i
run: pnpm i --frozen-lockfile

- uses: actions/setup-python@v4
with:
Expand Down

0 comments on commit fa6b0ee

Please sign in to comment.