Skip to content

Commit

Permalink
Merge pull request #2071 from ember-learn/pnpm
Browse files Browse the repository at this point in the history
Switch to pnpm
  • Loading branch information
ef4 authored Nov 7, 2024
2 parents 4563b16 + 8ae8ef5 commit 2618f75
Show file tree
Hide file tree
Showing 6 changed files with 17,624 additions and 36,931 deletions.
24 changes: 24 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Setup node and pnpm
description: Setup node and install dependencies using pnpm
inputs:
use_lockfile:
description: 'Whether to use the lockfile vs latest floating dependencies'
required: false
default: 'true'
use_pinned_node:
description: 'Whether to use the node version defined in .npmrc'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install ${{ fromJSON('{"false":"--no-lockfile", "true":"--frozen-lockfile"}')[inputs.use_lockfile] }}
shell: bash
46 changes: 9 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
pull_request:

env:
NODE_VERSION: 20
NODE_OPTIONS: '--max_old_space_size=4096'

jobs:
Expand All @@ -17,41 +16,23 @@ jobs:
timeout-minutes: 7
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: ${{ env.NODE_VERSION }}

- run: npm i -g npm@9
- run: npm ci

uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Lint
run: npm run lint
run: pnpm run lint

test-app:
name: Test app
runs-on: ubuntu-latest
timeout-minutes: 7
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: ${{ env.NODE_VERSION }}

- run: npm i -g npm@9
- run: npm ci

uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Test
uses: percy/[email protected]
with:
custom-command: npm run test:ember
custom-command: pnpm run test:ember
env:
PERCY_TOKEN: 877df6aad8486060f69a34864b6cd33f870633743b23411343737c46a875a762

Expand All @@ -61,16 +42,7 @@ jobs:
timeout-minutes: 7
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v2

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
cache: 'npm'
node-version: ${{ env.NODE_VERSION }}

- run: npm i -g npm@9
- run: npm ci

uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Test
run: npm run test:node
run: pnpm run test:node
Loading

0 comments on commit 2618f75

Please sign in to comment.