mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Use pnpm instead of npm (#1375)
Pnpm is like npm except instead of keeping multiple copies of dependencies, it shares a single copy for multiple dependencies significantly reducing build time and the space needed to hold all the dependencies. Read [here](https://pnpm.io/motivation) for more info. This changes our CI to use pnpm and allows developers to choose to use pnpm instead of npm. Also, pnpm has a built-in node version manager so devs no longer need to use nvm to work on photonvision. All npm functionality (including photon-server gradle tasks) still functions using npm so this isn't breaking. We should make a docs change to suggest to use pnpm.
This commit is contained in:
16
.github/workflows/lint-format.yml
vendored
16
.github/workflows/lint-format.yml
vendored
@@ -72,17 +72,23 @@ jobs:
|
||||
working-directory: photon-client
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: '**/pnpm-lock.yaml'
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
run: pnpm install
|
||||
- name: Check Linting
|
||||
run: npm run lint-ci
|
||||
run: pnpm run lint-ci
|
||||
- name: Check Formatting
|
||||
run: npm run format-ci
|
||||
run: pnpm run format-ci
|
||||
server-index:
|
||||
name: "Check server index.html not changed"
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
Reference in New Issue
Block a user