Skip to content

Commit

Permalink
build: replace npm with pnpm (#22)
Browse files Browse the repository at this point in the history
* build: replace npm with pnpm
* ci: remove pnpm version from action
ci: replace npm with pnpm on render
  • Loading branch information
grantwforsythe authored Jul 3, 2024
1 parent 9848cbe commit 2277926
Show file tree
Hide file tree
Showing 9 changed files with 19,200 additions and 23,224 deletions.
10 changes: 6 additions & 4 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Install dependencies
description: Install node and npm, then run npm install
description: Install node and pnpm, then run pnpm install

runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install Node and dependencies
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package-lock.json
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install
env:
HUSKY: '0'
shell: bash
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
with:
fetch-depth: 0

- name: Install node, npm, and dependencies
- name: Install node, pnpm, and dependencies
uses: ./.github/actions/install-dependencies

- name: Build Packages
run: npm run build
run: pnpm run build
shell: bash

test:
Expand All @@ -30,11 +30,11 @@ jobs:
with:
fetch-depth: 0

- name: Install node, npm, and dependencies
- name: Install node, pnpm, and dependencies
uses: ./.github/actions/install-dependencies

- name: Run unit tests
run: npm run test:ci
run: pnpm run test:ci
shell: bash

- name: Upload coverage reports to Codecov
Expand All @@ -51,14 +51,14 @@ jobs:
with:
fetch-depth: 0

- name: Install node, npm, and dependencies
- name: Install node, pnpm, and dependencies
uses: ./.github/actions/install-dependencies

- name: Run e2e tests
uses: cypress-io/github-action@v6
with:
browser: chrome
start: npm start
start: pnpm start
# Record the test in Cypress Cloud
record: true
env:
Expand All @@ -74,9 +74,9 @@ jobs:
with:
fetch-depth: 0

- name: Install node, npm, and dependencies
- name: Install node, pnpm, and dependencies
uses: ./.github/actions/install-dependencies

- name: Lint Packages
run: npm run lint
run: pnpm run lint
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install node, npm, and dependencies
- name: Install node, pnpm, and dependencies
uses: ./.github/actions/install-dependencies

- name: Initialize Git User
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run release --ci
run: pnpm run release --ci

- name: Deploy to Render
env:
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
To get started, ensure both [Node v18.x or the latest LTS version](https://nodejs.org) and npm 8.x are installed, and then install the dependencies.

```bash
npm install
npm start
pnpm install
pnpm start
```

### Tech Stack
Expand All @@ -18,13 +18,13 @@ npm start
[Cypress](https://www.cypress.io/) is used for E2E tests.

```bash
npm run e2e
pnpm run e2e
```

[Jasmine](https://jasmine.github.io/) and [Karma](https://karma-runner.github.io/6.4/index.html) are used for unit tests.

```bash
npm run test
pnpm run test
```

## Raising Pull Requests
Expand Down
1 change: 1 addition & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
"@angular-eslint/schematics",
"@schematics/angular"
],
"packageManager": "pnpm",
"analytics": false
}
}
Loading

0 comments on commit 2277926

Please sign in to comment.