Skip to content

Commit

Permalink
[inertiajs#1875] Merge pull request #7 from jamesst20/pnpm_setup_main
Browse files Browse the repository at this point in the history
[inertiajs#1875] Migrate from npm to pnpm
  • Loading branch information
jamesst20 committed May 12, 2024
1 parent 8738c29 commit 61f8e48
Show file tree
Hide file tree
Showing 18 changed files with 9,405 additions and 6,665 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,32 @@ jobs:
strategy:
matrix:
adapter: ['react', 'vue2', 'vue3']
node-version: [20]

steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
node-version: 20
version: 9

- name: Cache node modules
uses: actions/cache@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('package-lock.json') }}
path: |
~/.cache
node_modules
packages/${{ matrix.adapter }}/tests/node_modules
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install packages
run: pnpm install

- name: Build Inertia
run: |
npm install
cd packages/core && npm run build
cd ../${{ matrix.adapter }} && npm run build
cd packages/core && pnpm run build
cd ../${{ matrix.adapter }} && pnpm run build
- name: Build Playground
run: |
cd playgrounds/${{ matrix.adapter }} && npm run build
cd playgrounds/${{ matrix.adapter }}
pnpm run build
39 changes: 16 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,37 @@ jobs:
matrix:
adapter: ['vue3']
browser: ['chrome']
node-version: [20]

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
node-version: 20
version: 9

- name: Cache node modules
uses: actions/cache@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('package-lock.json') }}
path: |
~/.cache
node_modules
packages/vue3/tests/node_modules
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install packages
run: pnpm install

- name: Build Inertia
run: |
npm install
cd packages/core && npm run build
cd ../vue3 && npm run build
- name: Local-link @inertiajs/core
run: cd packages/core && npm link

- name: Local-link @inertiajs/${{ matrix.adapter }}
run: cd packages/${{ matrix.adapter }} && npm link
cd packages/core && pnpm run build
cd ../${{ matrix.adapter }} && pnpm run build
- name: Install Cypress Dependencies
- name: Install Cypress
run: |
cd packages/${{ matrix.adapter }}/tests
npm install
npm link "@inertiajs/core" "@inertiajs/${{ matrix.adapter }}"
./node_modules/cypress/bin/cypress install
- name: Run Cypress (${{ matrix.browser }} / ${{ matrix.adapter }})
run: |
cd packages/${{ matrix.adapter }}/tests
npm run ci
pnpm run ci
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public-hoist-pattern[]=@vue*
Loading

0 comments on commit 61f8e48

Please sign in to comment.