Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to pnpm #405

Merged
merged 4 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 15 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,28 @@ on:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm lint

test:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v2
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
- name: lint
run: yarn lint
- name: test
run: yarn test:ember
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm test:ember
- id: set-matrix
run: echo "::set-output name=matrix::$(yarn --silent scenario-tester list --files ./scenarios.js --matrix 'yarn qunit ./scenarios.js --filter %s:')"
run: echo "::set-output name=matrix::$(pnpm scenario-tester list --files ./scenarios.js --matrix 'pnpm qunit ./scenarios.js --filter %s:')"
working-directory: test-app


compat-scenarios:
needs: test
name: ${{ matrix.name }}
Expand All @@ -44,18 +40,6 @@ jobs:
matrix: ${{fromJson(needs.test.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v2
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --no-lockfile
- name: test
run: ${{ matrix.command }}
- uses: wyvox/action-setup-pnpm@v3
- run: ${{ matrix.command }}
working-directory: test-app
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

* `git clone <repository-url>`
* `cd ember-moment`
* `yarn install`
* `pnpm install`

## Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`
* `pnpm lint:hbs`
* `pnpm lint:js`
* `pnpm lint:js --fix`

## Running tests

Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
"test": "npm-run-all lint:* test:*",
"test:ember": "cd test-app && ember test",
"test:ember-compatibility": "cd test-app && qunit scenarios.js",
"prepare": "npm-run-all prepublishOnly link-test-app",
"link-test-app": "addon-dev link-test-app",
"prepare": "npm-run-all prepublishOnly",
"prepublishOnly": "rollup --config"
},
"dependencies": {
Expand Down Expand Up @@ -150,7 +149,7 @@
},
"volta": {
"node": "18.20.3",
"yarn": "1.22.22"
"pnpm": "9.4.0"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"packageManager": "[email protected]"
}
Loading
Loading