Skip to content

Commit

Permalink
ci(.github/pnpm/setup-node.yml): pnpm action (#462)
Browse files Browse the repository at this point in the history
# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

add pnpm action to keep consistency

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md)
2. I added documents and tests.
  • Loading branch information
manudeli authored Dec 16, 2023
1 parent 8030a36 commit 1847565
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 32 deletions.
13 changes: 13 additions & 0 deletions .github/actions/pnpm-setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: setup pnpm & node
description: setup pnpm & node
runs:
using: composite
steps:
- uses: pnpm/action-setup@v2
with:
version: 8.12.0
- uses: actions/setup-node@v4
with:
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
node-version-file: ".nvmrc"
9 changes: 1 addition & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ jobs:
command: ['lint', 'lint:attw', 'lint:monorepo', 'lint:pub', 'test', 'test:tsd', 'type:check', 'build']
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.12.0
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'
node-version-file: '.nvmrc'
- uses: ./.github/actions/pnpm-setup-node
- run: pnpm install --frozen-lockfile
- if: matrix.command == 'test'
run: pnpm exec playwright install
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.12.0
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'
node-version-file: '.nvmrc'
- uses: ./.github/actions/pnpm-setup-node
- run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install
- run: pnpm test
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.12.0
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'
node-version-file: '.nvmrc'
- uses: ./.github/actions/pnpm-setup-node
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.12.0
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'
node-version-file: '.nvmrc'
- uses: ./.github/actions/pnpm-setup-node
- run: pnpm install --frozen-lockfile
- name: Create Changesets Pull Request or Publish to NPM
id: changesets
Expand Down

0 comments on commit 1847565

Please sign in to comment.