Skip to content

Commit 298825e

Browse files
committed
Also test against strictest embroider
1 parent 6173234 commit 298825e

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

.github/workflows/ci-build.yml

+18-2
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,42 @@ on:
1313
jobs:
1414
test:
1515
timeout-minutes: 10
16-
name: Tests
16+
name: "Tests: ${{ matrix.EMBROIDER && 'embroider' || 'classic' }}"
1717
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
EMBROIDER:
22+
- '' # classic
23+
- 'true'
1824

1925
steps:
2026
- uses: actions/checkout@v4
2127
- uses: wyvox/action-setup-pnpm@v3
2228
- run: pnpm lint
2329
- run: pnpm test:ember
2430
working-directory: test-apps/base-tests
31+
env:
32+
EMBROIDER: ${{ matrix.EMBROIDER }}
2533

2634
floating-dependencies:
2735
timeout-minutes: 10
28-
name: "Floating Dependencies"
36+
name: "Floating Dependencies: ${{ matrix.EMBROIDER && 'embroider' || 'classic' }}"
2937
runs-on: ubuntu-latest
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
EMBROIDER:
42+
- '' # classic
43+
- 'true'
3044

3145
steps:
3246
- uses: actions/checkout@v4
3347
- uses: wyvox/action-setup-pnpm@v3
3448
- run: pnpm test:ember
3549
working-directory: test-apps/base-tests
50+
env:
51+
EMBROIDER: ${{ matrix.EMBROIDER }}
3652

3753
try-scenarios:
3854
timeout-minutes: 10

test-apps/base-tests/ember-cli-build.js

+20
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,25 @@ module.exports = function (defaults) {
99
// Add options here
1010
});
1111

12+
if (process.env.EMBROIDER) {
13+
const { Webpack } = require('@embroider/webpack');
14+
15+
return require('@embroider/compat').compatBuild(app, Webpack, {
16+
extraPublicTrees: [],
17+
staticAddonTrees: true,
18+
staticAddonTestSupportTrees: true,
19+
staticHelpers: true,
20+
staticModifiers: true,
21+
staticComponents: true,
22+
staticEmberSource: true,
23+
packagerOptions: {
24+
webpackConfig: {
25+
// Highest fidelity source map (at the cost of build speed)
26+
devtool: 'source-map',
27+
},
28+
},
29+
});
30+
}
31+
1232
return app.toTree();
1333
};

test-apps/base-tests/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"lint:js:fix": "eslint . --fix",
2323
"lint:types": "tsc --noEmit",
2424
"start": "ember serve",
25+
"start:embroider": "EMBROIDER=1 ember serve",
2526
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
2627
"test:ember": "ember test",
2728
"test:ember-compatibility": "ember try:each",

0 commit comments

Comments
 (0)