Skip to content

Commit

Permalink
chore: more robust node/pnpm ci setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Jan 23, 2024
1 parent 2d502ba commit cd66c55
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:

jobs:
build:
name: Build and Test
timeout-minutes: 15
name: CI
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
Expand All @@ -21,14 +20,28 @@ jobs:
with:
fetch-depth: 2

- name: Setup Volta
uses: volta-cli/action@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
run_install: false

- name: Install node
run: volta install node
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Install pnpm
run: volta install pnpm
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
Expand Down

0 comments on commit cd66c55

Please sign in to comment.