Skip to content

Commit

Permalink
Merge pull request #83 from ef4/pnpm
Browse files Browse the repository at this point in the history
switch to pnpm and fix tests
  • Loading branch information
ef4 authored Jul 2, 2024
2 parents 7ce689b + 66f4f32 commit 4989695
Show file tree
Hide file tree
Showing 6 changed files with 12,491 additions and 13,459 deletions.
45 changes: 26 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ on:
push:
branches:
- master
tags:
- '*'
- main
pull_request:
schedule:
- cron: '0 8 * * 1' # Mondays at 8am

jobs:
test:
Expand All @@ -17,17 +14,21 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16
cache: pnpm
- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm i --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm lint
- name: Test
run: yarn test
run: pnpm test

test-no-lock:
name: Floating Dependencies
Expand All @@ -36,17 +37,19 @@ jobs:
- test
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16
cache: pnpm
- name: Install dependencies
uses: bahmutov/npm-install@v1
with:
useLockFile: false
run: pnpm i --no-lockfile
- name: Test
run: yarn test
run: pnpm test

test-try:
name: Additional Tests
Expand All @@ -66,12 +69,16 @@ jobs:
- embroider-optimized
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16
cache: pnpm
- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm i --frozen-lockfile
- name: Test
run: yarn ember try:one ${{ matrix.scenario }}
run: pnpm ember try:one ${{ matrix.scenario }}
4 changes: 2 additions & 2 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
return {
useYarn: true,
command: 'yarn test',
usePnpm: true,
command: 'pnpm test',
scenarios: [
{
name: 'ember-lts-3.20',
Expand Down
4 changes: 2 additions & 2 deletions node-tests/basic-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { execFileSync } = require('child_process');
const { module: Qmodule, test } = require('qunitjs');
const { module: Qmodule, test } = require('qunit');
const jsdom = require('jsdom');
const { JSDOM } = jsdom;
const fs = require('fs');
Expand All @@ -12,7 +12,7 @@ function findDocument(filename) {
Qmodule('Prember', function (hooks) {
hooks.before(async function () {
if (!process.env.REUSE_FASTBOOT_BUILD) {
execFileSync('node', ['./node_modules/.bin/ember', 'build']);
execFileSync('pnpm', ['ember', 'build']);
}
process.env.REUSE_FASTBOOT_BUILD = true;
});
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "qunit node-tests"
"test": "qunit node-tests/*-test.js"
},
"dependencies": {
"broccoli-debug": "^0.6.3",
Expand Down Expand Up @@ -60,7 +60,7 @@
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.0",
"ember-source-channel-url": "^3.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 @@ -73,7 +73,6 @@
"prettier": "^2.3.2",
"qunit": "^2.16.0",
"qunit-dom": "^1.6.0",
"qunitjs": "^2.4.1",
"webpack": "^5.59.0"
},
"engines": {
Expand Down
Loading

0 comments on commit 4989695

Please sign in to comment.