Skip to content

Commit

Permalink
Merge pull request #1038 from ember-cli/pnpm
Browse files Browse the repository at this point in the history
Swap to pnpm
  • Loading branch information
mansona authored Dec 20, 2024
2 parents d3b56f1 + 0cea39b commit 874252c
Show file tree
Hide file tree
Showing 5 changed files with 10,134 additions and 9,399 deletions.
100 changes: 63 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,35 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- run: yarn install
- run: yarn lint
- run: pnpm install --frozen-lockfile
- run: pnpm lint
test:
name: 'Tests'
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache: pnpm
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Run Tests
run: yarn node-test-with-coverage
run: pnpm node-test-with-coverage
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
Expand All @@ -53,14 +60,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache: pnpm
- name: Install Dependencies
run: yarn install --no-lockfile
run: pnpm install --no-lockfile
- name: Run Tests
run: yarn node-test
run: pnpm node-test

all-commands-smoke-tests:
name: Tests (commands smoke test)
Expand All @@ -77,72 +87,76 @@ jobs:
matrix:
command:
# try:each
- ./node_modules/.bin/ember try:each
- npx ember try:each

# skip-cleanup option
- ./node_modules/.bin/ember try:each --skip-cleanup
- npx ember try:each --skip-cleanup

# config-path option
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js'
- npx ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js'

# both ember-try options
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true
- npx ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true

# try:ember
- ./node_modules/.bin/ember try:ember '> 4.10.0 < 5.2.0'
- ./node_modules/.bin/ember try:ember '4.9.0' --config-path='../test/fixtures/dummy-ember-try-config.js'
- ./node_modules/.bin/ember try:ember '4.8.3' --skip-cleanup=true
- npx ember try:ember '> 4.10.0 < 5.2.0'
- npx ember try:ember '4.9.0' --config-path='../test/fixtures/dummy-ember-try-config.js'
- npx ember try:ember '4.8.3' --skip-cleanup=true

# try:config
- ./node_modules/.bin/ember try:config
- ./node_modules/.bin/ember try:config --config-path='../test/fixtures/dummy-ember-try-config.js'
- npx ember try:config
- npx ember try:config --config-path='../test/fixtures/dummy-ember-try-config.js'

# try:one <scenario>
- ./node_modules/.bin/ember try:one default
- npx ember try:one default

# custom command
- ./node_modules/.bin/ember try:one default --- ember help
- npx ember try:one default --- ember help

# skip-cleanup option
- ./node_modules/.bin/ember try:one default --skip-cleanup
- npx ember try:one default --skip-cleanup

# config-path option
- ./node_modules/.bin/ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js'
- npx ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js'

# both ember-try options
- ./node_modules/.bin/ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true
- npx ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true

# custom command with options to command
- ./node_modules/.bin/ember try:one default --- ember help --silent
- npx ember try:one default --- ember help --silent

# custom command mixed with ember try's own option
- ./node_modules/.bin/ember try:one default --skip-cleanup --- ember help --silent
- npx ember try:one default --skip-cleanup --- ember help --silent

# try:reset
- ./node_modules/.bin/ember try:reset
- npx ember try:reset

# Environment variables availability
- FOO="5" ./node_modules/.bin/ember try:one default --- ./fail-if-no-foo.sh
- FOO="5" npx ember try:one default --- ./fail-if-no-foo.sh

- ./node_modules/.bin/ember try:one default --- FOO=5 ./fail-if-no-foo.sh
- npx ember try:one default --- FOO=5 ./fail-if-no-foo.sh

# Custom, compound commands
- ./node_modules/.bin/ember try:one default --- 'echo 1 && echo 2'
- npx ember try:one default --- 'echo 1 && echo 2'

# Environment variables from config
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config-different-env-vars.js'
- npx ember try:each --config-path='../test/fixtures/dummy-ember-try-config-different-env-vars.js'

# fs-extra versions 7.x and above caused a regresion
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config-fs-extra-scenarios.js'
- npx ember try:each --config-path='../test/fixtures/dummy-ember-try-config-fs-extra-scenarios.js'

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- name: install deps
run: yarn install
run: pnpm install --frozen-lockfile
- name: install smoke-test-app deps
# using `npm` to install in the smoke-test-app so that `file:` will be treated
# as a symlink (npm handles `file:../` as symlink, and `yarn` treats it
Expand All @@ -168,16 +182,20 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm

- name: install deps
run: yarn install
run: pnpm install --frozen-lockfile
- name: install smoke-test-app deps
run: npm install
working-directory: smoke-test-app
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
- run: npx ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
working-directory: smoke-test-app

yarn-smoke-tests:
Expand All @@ -196,16 +214,20 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm

- name: install deps
run: yarn install
run: pnpm install --frozen-lockfile
- name: install smoke-test-app deps
run: yarn install
working-directory: smoke-test-app
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-yarn-scenarios.js'
- run: npx ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-yarn-scenarios.js'
working-directory: smoke-test-app

windows-smoke-tests:
Expand All @@ -219,14 +241,18 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- name: install deps
run: yarn install
run: pnpm install --frozen-lockfile
- name: install smoke-test-app deps
run: npm install
working-directory: smoke-test-app
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
- run: npx ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
working-directory: smoke-test-app
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/CHANGELOG.md
pnpm-lock.yaml
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
"scripts": {
"format": "prettier . --cache --write",
"lint": "concurrently --group --prefix-colors auto --timings \"yarn:lint:*(!fix)\"",
"lint:fix": "concurrently --group --prefix-colors auto --timings \"yarn:lint:*:fix\" && yarn format",
"lint": "concurrently --group --prefix-colors auto --timings \"pnpm:lint:*(!fix)\"",
"lint:fix": "concurrently --group --prefix-colors auto --timings \"pnpm:lint:*:fix\" && pnpm format",
"lint:format": "prettier . --cache --check",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
Expand Down
Loading

0 comments on commit 874252c

Please sign in to comment.