Skip to content

Commit

Permalink
Merge pull request #494 from adopted-ember-addons/pnpm
Browse files Browse the repository at this point in the history
swap to pnpm
  • Loading branch information
mansona authored Nov 13, 2024
2 parents 8ad5163 + 2f8684a commit 8c5d071
Show file tree
Hide file tree
Showing 8 changed files with 13,487 additions and 14,476 deletions.
151 changes: 40 additions & 111 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ name: CI
on:
push:
branches:
- main
- master
pull_request:
pull_request: {}

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

env:
NODE_VERSION: '14.x'
Expand All @@ -14,38 +19,16 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
hashFiles('**/yarn.lock'
) }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-
cache: pnpm
- name: Install Dependencies
run: yarn install --frozen-lockfile --ignore-engines
if: |
steps.cache-dependencies.outputs.cache-hit != 'true'
run: pnpm i --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm run lint


test:
Expand All @@ -59,35 +42,16 @@ jobs:
browser: [chrome]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
hashFiles('**/yarn.lock'
) }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-
cache: pnpm
- name: Install Dependencies
run: yarn install --frozen-lockfile
if: |
steps.cache-dependencies.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Test
run: pnpm test:ember --launch chrome

try-scenarios:
name: Tests - ${{ matrix.ember-try-scenario }}
Expand Down Expand Up @@ -115,77 +79,42 @@ jobs:
allow-failure: true

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
hashFiles('**/yarn.lock'
) }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-
cache: pnpm
- name: Install Dependencies
run: yarn install --frozen-lockfile
if: |
steps.cache-dependencies.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Test
id: test
env:
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
run: yarn ember try:one $EMBER_TRY_SCENARIO
run: pnpm ember try:one $EMBER_TRY_SCENARIO
continue-on-error: ${{ matrix.allow-failure }}
- uses: mainmatter/continue-on-error-comment@v1
if: ${{ matrix.allow-failure }}
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
outcome: ${{ steps.test.outcome }}
test-id: ${{ matrix.ember-try-scenario }}

- name: Test
run: yarn test:ember --launch ${{ matrix.browser }}

floating-dependencies:
name: Floating Dependencies
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
needs: lint

strategy:
matrix:
os: [ubuntu-latest]
browser: [chrome]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-floating-deps
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-
cache: pnpm
- name: Install Dependencies
run: yarn install --no-lockfile --non-interactive
run: pnpm install --no-lockfile

- name: Test
run: yarn test:ember --launch ${{ matrix.browser }}
run: pnpm run test:ember --launch chrome
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

* `git clone <repository-url>`
* `cd ember-data-factory-guy`
* `yarn install`
* `pnpm install`

## Linting

* `yarn lint`
* `yarn lint:fix`
* `pnpm lint`
* `pnpm lint:fix`

## Running tests

Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Once the prep work is completed, the actual release is straight forward:
* First, ensure that you have installed your projects dependencies:

```sh
yarn install
pnpm install
```

* Second, ensure that you have obtained a
Expand Down
2 changes: 1 addition & 1 deletion config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const getChannelURL = require('ember-source-channel-url');

module.exports = async function () {
return {
useYarn: true,
usePnpm: true,
scenarios: [
{
name: 'ember-lts-3.20',
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
"ember-auto-import": "^1.11.3",
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.7.1",
"fake-xml-http-request": "^2.1.2",
"pretender": "^3.4.3",
"resolve": "^1.20.0",
"route-recognizer": "^0.3.4",
"whatwg-fetch": "^3.6.2"
},
"devDependencies": {
Expand Down Expand Up @@ -71,7 +73,7 @@
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.6.0",
"ember-test-selectors": "^6.0.0",
"ember-try": "^1.4.0",
"ember-try": "^3.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.4",
Expand All @@ -87,9 +89,9 @@
"release-it-lerna-changelog": "^3.1.0"
},
"peerDependencies": {
"active-model-adapter": "*",
"ember-data-model-fragments": "*",
"ember-django-adapter": "*",
"active-model-adapter": "*"
"ember-django-adapter": "*"
},
"peerDependenciesMeta": {
"ember-data-model-fragments": {
Expand Down Expand Up @@ -132,5 +134,6 @@
"release": true,
"tokenRef": "GITHUB_AUTH"
}
}
},
"packageManager": "[email protected]+sha512.7afe2410642b39c698df46da4ce5c7231a5cce360698d69f8cf8f42257d40b3e43f231053b07b8de849fd4ffbf4a71ff57b835137777a352388f3d3da747200e"
}
Loading

0 comments on commit 8c5d071

Please sign in to comment.