Skip to content

Commit d3aaac0

Browse files
stefanpennerkratiahuja
authored andcommitted
Introduce appveyor and run using npm instead of yarn for now.
1 parent d971d7f commit d3aaac0

12 files changed

Lines changed: 59 additions & 123 deletions

.bowerrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.travis.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
language: node_js
33
node_js:
4-
- "4"
5-
- "stable"
4+
# disabled while we refactor tests
5+
# - "4"
6+
- "6"
7+
# - "7"
68

79
env:
810
- CXX=g++-4.8 WORKER_COUNT=2
@@ -16,21 +18,20 @@ addons:
1618
sudo: false
1719

1820
cache:
19-
directories:
20-
- $HOME/.npm
21-
- $HOME/.cache # includes bowers cache
21+
yarn: false # switch to yarn once ember-cli-addon-tests is removed
2222

2323
before_install:
24-
- npm config set spin false
25-
- npm install -g npm@^3
26-
- npm --version
27-
- npm install -g bower phantomjs-prebuilt
28-
- bower --version
24+
# Once we no longer support Node.js 0.12 we can drop this entire section.
25+
# prevent the npm loading indicator
26+
- npm config --global set spin false
27+
# if npm version is less than 3.0.0, upgrade to 3
28+
- if [[ $(npm -v | cut -d '.' -f 1) -lt 3 ]]; then npm i -g npm@^3; fi
29+
- npm i -g phantomjs-prebuilt
30+
- npm i -g bower # for ember-cli-addon-tests
2931
- phantomjs --version
3032

3133
install:
3234
- npm install
33-
- bower install
3435

3536
script:
3637
- npm test

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![npm version](https://badge.fury.io/js/ember-cli-fastboot.svg)](https://badge.fury.io/js/ember-cli-fastboot)
44
[![Build Status](https://travis-ci.org/ember-fastboot/ember-cli-fastboot.svg?branch=master)](https://travis-ci.org/ember-fastboot/ember-cli-fastboot)
5+
[![Build status](https://ci.appveyor.com/api/projects/status/6qcpp4ndy3ao4yv8/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/ember-cli-fastboot/branch/master)
56

67
An Ember CLI addon that allows you to render and serve Ember.js apps on
78
the server. Using FastBoot, you can serve rendered HTML to browsers and

appveyor.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# https://www.appveyor.com/docs/appveyor-yml/
2+
3+
# Test against these versions of Node.js.
4+
environment:
5+
MOCHA_REPORTER: "mocha-appveyor-reporter"
6+
matrix:
7+
# disabled while we refactor tests
8+
# - nodejs_version: "4"
9+
- nodejs_version: "6"
10+
# - nodejs_version: "7"
11+
12+
# Install scripts. (runs after repo cloning)
13+
install:
14+
- ps: Install-Product node $env:nodejs_version
15+
- npm config set spin false
16+
- appveyor-retry npm install -g npm@^3
17+
- appveyor-retry npm i -g bower # for ember-cli-addon-tests
18+
- npm --version
19+
- appveyor-retry choco install phantomjs
20+
- appveyor-retry yarn
21+
- appveyor-retry yarn add mocha-appveyor-reporter # must be installed locally.
22+
23+
24+
# Post-install test scripts.
25+
test_script:
26+
# Output useful info for debugging.
27+
- git rev-parse HEAD
28+
# switch to yarn once ember-cli-addon-tests are removed
29+
- cmd: npm test
30+
31+
# Don't actually build.
32+
build: off
33+
34+
# Set build version format here instead of in the admin panel.
35+
version: "{build}"

bower.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const existsSync = require('exists-sync');
2424
module.exports = {
2525
name: 'ember-cli-fastboot',
2626

27-
2827
init() {
2928
this._super.init && this._super.init.apply(this, arguments);
3029
},

lib/utilities/parse-stack-trace.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"lodash.defaults": "^4.0.1",
3838
"lodash.uniq": "^4.2.0",
3939
"md5-hex": "^1.3.0",
40-
"portfinder": "^1.0.3",
4140
"rsvp": "^3.0.16",
4241
"silent-error": "^1.0.0"
4342
},
@@ -47,7 +46,7 @@
4746
"chai-fs": "^1.0.0",
4847
"ember-ajax": "^2.4.1",
4948
"ember-cli": "2.12.0-beta.1",
50-
"ember-cli-addon-tests": "^0.6.0",
49+
"ember-cli-addon-tests": "^0.7.0",
5150
"ember-cli-dependency-checker": "^1.3.0",
5251
"ember-cli-eslint": "^3.0.2",
5352
"ember-cli-htmlbars": "^1.1.1",

test/dynamic-initializers-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ describe('dynamic initializers', function() {
2121
});
2222

2323
it('filters FastBoot initializers from browser build', function() {
24-
let appPath = app.filePath('dist/assets/dynamic-initializers.js');
24+
let appPath = app.filePath('dist/assets/dynamic-initializers.js');
2525
expect(appPath).to.not.have.content.that.match(
2626
/But I warn you, if you don't tell me that this means war/);
2727
expect(appPath).to.have.content.that.match(
2828
/Well, Prince, so Genoa and Lucca are now just family estates/);
2929
});
3030

3131
it('filters browser initializers from FastBoot build', function() {
32-
let appPath = app.filePath('dist/assets/dynamic-initializers-fastboot.js');
32+
let appPath = app.filePath('dist/assets/dynamic-initializers-fastboot.js');
3333
expect(appPath).to.have.content.that.match(
3434
/But I warn you, if you don't tell me that this means war/);
3535
expect(appPath).to.not.have.content.that.match(
3636
/Well, Prince, so Genoa and Lucca are now just family estates/);
3737
});
3838

3939
it('filters FastBoot instance initializers from browser build', function() {
40-
let appPath = app.filePath('dist/assets/dynamic-initializers.js');
40+
let appPath = app.filePath('dist/assets/dynamic-initializers.js');
4141
expect(appPath).to.not.have.content.that.match(/It was in July, 1805/);
4242
expect(appPath).to.have.content.that.match(/But how do you do/);
4343
});

test/package-json-test.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('generating package.json', function() {
2626
describe('with FastBoot builds', function() {
2727

2828
before(function() {
29-
return app.run('ember', 'build');
29+
return app.runEmberCommand('build');
3030
});
3131

3232
it('builds a package.json', function() {
@@ -101,7 +101,7 @@ describe('generating package.json', function() {
101101
describe('with production FastBoot builds', function() {
102102

103103
before(function() {
104-
return app.run('ember', 'build', '--environment', 'production');
104+
return app.runEmberCommand('build', '--environment=production');
105105
});
106106

107107
// https://github.com/tildeio/ember-cli-fastboot/issues/102
@@ -133,7 +133,7 @@ describe('generating package.json', function() {
133133
before(function() {
134134
return customApp.create('customized-fingerprinting')
135135
.then(function() {
136-
return customApp.run('ember', 'build', '--environment', 'production');
136+
return customApp.runEmberCommand('build', '--environment=production');
137137
});
138138
});
139139

@@ -155,7 +155,6 @@ describe('generating package.json', function() {
155155
expect(p(file)).to.be.a.file();
156156
});
157157
});
158-
159158
});
160159

161160
describe('with customized outputPaths options', function() {
@@ -165,7 +164,7 @@ describe('generating package.json', function() {
165164
before(function() {
166165
return customApp.create('customized-outputpaths')
167166
.then(function() {
168-
return customApp.run('ember', 'build');
167+
return customApp.runEmberCommand('build');
169168
});
170169
});
171170

@@ -185,7 +184,6 @@ describe('generating package.json', function() {
185184
expect(p(file)).to.be.a.file();
186185
});
187186
});
188-
189187
});
190188

191189
describe('with custom htmlFile', function() {
@@ -196,7 +194,7 @@ describe('generating package.json', function() {
196194
before(function() {
197195
return customApp.create('custom-html-file')
198196
.then(function() {
199-
return customApp.run('ember', 'build', '--environment', 'production');
197+
return customApp.runEmberCommand('build', '--environment=production');
200198
});
201199
});
202200

@@ -211,12 +209,11 @@ describe('generating package.json', function() {
211209
expect(manifest.htmlFile).to.equal('custom-index.html');
212210
expect(p(manifest.htmlFile)).to.be.a.file();
213211
});
214-
215212
});
216213
});
217214

218215
function addFastBootDeps(app) {
219-
return app.editPackageJSON(function(pkg) {
216+
return app.editPackageJSON(pkg => {
220217
pkg['devDependencies']['fake-addon'] = '*';
221218
pkg['devDependencies']['fake-addon-2'] = '*';
222219
pkg['fastbootDependencies'] = ["rsvp"];

0 commit comments

Comments
 (0)