Skip to content

Commit

Permalink
ci(workflow): update pnpm install and caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Jul 15, 2024
1 parent 7fdc83b commit ec6e92d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 77 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node v16
uses: actions/setup-node@v4
with:
node-version: 16.x

- uses: pnpm/action-setup@v2
name: Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
- name: Install Node v16
uses: actions/setup-node@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 16.x
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
25 changes: 6 additions & 19 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node v16
uses: actions/setup-node@v4
with:
node-version: 16.x

- uses: pnpm/action-setup@v2
name: Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
- name: Install Node v16
uses: actions/setup-node@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 16.x
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
26 changes: 6 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,32 +77,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node v16
uses: actions/setup-node@v4
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'

- uses: pnpm/action-setup@v2
name: Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
- name: Install Node v16
uses: actions/setup-node@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 16.x
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
25 changes: 6 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node v16
uses: actions/setup-node@v4
with:
node-version: 16.x

- uses: pnpm/action-setup@v2
name: Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
- name: Install Node v16
uses: actions/setup-node@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 16.x
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down

0 comments on commit ec6e92d

Please sign in to comment.