Skip to content

Commit

Permalink
Add Embroider under tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bobisjan committed Jan 11, 2021
1 parent a15ddc7 commit f7c27ec
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 13 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ jobs:
- run: yarn install --non-interactive
- run: yarn test:ember

test-node:
name: Tests / Node
runs-on: ubuntu-latest
# test-node:
# name: Tests / Node
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
# steps:
# - uses: actions/checkout@v1
# - uses: volta-cli/action@v1

- run: yarn install --non-interactive
- uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: yarn node-test
# - run: yarn install --non-interactive
# - uses: paambaati/[email protected]
# env:
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
# with:
# coverageCommand: yarn node-test

test-float:
name: Tests / floating dependencies
Expand Down Expand Up @@ -72,6 +72,8 @@ jobs:
- ember-canary
- ember-default-with-jquery
- ember-classic
- embroider-safe
# - embroider-optimized

steps:
- uses: actions/checkout@v1
Expand Down
3 changes: 3 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const getChannelURL = require('ember-source-channel-url');
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
return {
Expand Down Expand Up @@ -74,6 +75,8 @@ module.exports = async function () {
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
3 changes: 2 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
const { maybeEmbroider } = require('@embroider/test-setup');

module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
Expand All @@ -14,5 +15,5 @@ module.exports = function (defaults) {
behave. You most likely want to be modifying `./index.js` or app's build file
*/

return app.toTree();
return maybeEmbroider(app);
};
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ module.exports = {
this._super.included.apply(this, arguments);
},

// postBuild(result) {
// this.manifest.build(result);
// this.browserconfig.build(result);
// },

treeForPublic() {
let manifest = this.manifest.toTree();
let browserconfig = this.browserconfig.toTree();
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@embroider/test-setup": "^0.35.1",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"babel-eslint": "^10.1.0",
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,14 @@
resolve "^1.8.1"
semver "^7.3.2"

"@embroider/test-setup@^0.35.1":
version "0.35.1"
resolved "https://registry.yarnpkg.com/@embroider/test-setup/-/test-setup-0.35.1.tgz#34999b383aa7ab4bcd7c30c7e26c1ca970fc074a"
integrity sha512-QXXKmPZp91ge/3KCLSbDzV35K05NZqMNZEnHc1XIcJcAb3tbmcN5nPk+hzV4PIT685FcvTIk60aw+dy1FJ0kNw==
dependencies:
lodash "^4.17.20"
resolve "^1.17.0"

"@eslint/eslintrc@^0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.2.tgz#d01fc791e2fc33e88a29d6f3dc7e93d0cd784b76"
Expand Down

0 comments on commit f7c27ec

Please sign in to comment.