Skip to content

Commit

Permalink
Merge pull request #1132 from ember-learn/pnpm
Browse files Browse the repository at this point in the history
swap to pnpm
  • Loading branch information
mansona authored Feb 17, 2025
2 parents 13642e4 + e63ac0a commit f268fd0
Show file tree
Hide file tree
Showing 8 changed files with 20,659 additions and 67,554 deletions.
61 changes: 23 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- main
pull_request:

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
NODE_VERSION: 20
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
Expand All @@ -17,42 +21,28 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v2

- uses: mansona/npm-lockfile-version@v1

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

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
- run: pnpm i --frozen-lockfile
- run: pnpm run lint

test-app:
name: Test app
runs-on: ubuntu-latest
timeout-minutes: 5
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
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: npm ci

- name: Test
run: npx percy exec -- npm run test
- run: pnpm i --frozen-lockfile
- run: pnpm percy exec -- npm run test
env:
PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }}
PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }}
Expand All @@ -63,25 +53,20 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- name: Install dependencies
run: npm ci

- run: pnpm i --frozen-lockfile
- name: Build production app
run: npm run build
run: pnpm run build

- name: Run Lighthouse
run: npx @lhci/[email protected] autorun
run: pnpm lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }}
5 changes: 3 additions & 2 deletions .github/workflows/ember-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: mainmatter/ember-asset-size-action@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ignore-scripts=false
use-node-version=20.18.3
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ You will need the following things properly installed on your computer.

* `git clone <repository-url>` this repository
* `cd ember-website`
* `npm install`
* `pnpm install`

## Running / Development

* `npm start`
* `pnpm start`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

Expand All @@ -33,17 +33,17 @@ Make use of the many generators for code, try `ember help generate` for more det

### Running Tests

* `npm test`
* `npm test --server`
* `pnpm test`
* `pnpm test --server`

### Linting

* `npm run lint`
* `npm run lint:fix`
* `pnpm run lint`
* `pnpm run lint:fix`

### Building

* `npm run build` (production)
* `pnpm run build` (production)

### Deploying

Expand Down
2 changes: 1 addition & 1 deletion lib/content-data-generator/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable node/no-extraneous-require */
/* eslint-disable node/no-extraneous-require, node/no-missing-require */
'use strict';

const BroccoliMergeTrees = require('broccoli-merge-trees');
Expand Down
Loading

0 comments on commit f268fd0

Please sign in to comment.