Skip to content

Commit 4ad4eeb

Browse files
authored
Merge pull request #843 from ember-fastboot/fix-ci
Fix Github actions not running
2 parents 909c141 + d011ae1 commit 4ad4eeb

File tree

10 files changed

+274
-208
lines changed

10 files changed

+274
-208
lines changed

.github/ci.yml renamed to .github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI
22

33
on:
4-
pull_request:
4+
pull_request: {}
55
push:
66
# Filtering branches here prevents duplicate builds from pull_request and push
77
branches:
@@ -25,7 +25,7 @@ jobs:
2525

2626
strategy:
2727
matrix:
28-
node-version: [16.x, 14.x, 12.x]
28+
node-version: [14.x, 12.x]
2929
os: [ubuntu-latest, windows-latest]
3030

3131
steps:
@@ -53,7 +53,7 @@ jobs:
5353

5454
strategy:
5555
matrix:
56-
node-version: [16.x, 14.x, 12.x]
56+
node-version: [14.x, 12.x]
5757
os: [ubuntu-latest, windows-latest]
5858

5959
steps:
@@ -74,7 +74,7 @@ jobs:
7474

7575
strategy:
7676
matrix:
77-
node-version: [16.x, 14.x, 12.x]
77+
node-version: [14.x, 12.x]
7878
os: [ubuntu-latest, windows-latest]
7979

8080
steps:
@@ -100,7 +100,7 @@ jobs:
100100
strategy:
101101
fail-fast: false
102102
matrix:
103-
node-version: ['14', '12', '10']
103+
node-version: [14.x, 12.x]
104104

105105
steps:
106106
- name: Checkout Code
@@ -119,7 +119,6 @@ jobs:
119119
run: |
120120
yarn install --ignore-engines --frozen-lockfile
121121
- name: Run Mocha Tests
122-
working-directory: ./packages/ember-cli-fastboot
123122
run: |
124123
npm --version
125-
yarn test:mocha
124+
yarn workspace ember-cli-fastboot test:mocha

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"npm": false
5959
},
6060
"volta": {
61-
"node": "12.19.0",
61+
"node": "14.17.3",
6262
"yarn": "1.22.10"
6363
}
6464
}

packages/ember-cli-fastboot/test/fastboot-config-test.js

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,49 @@ const request = RSVP.denodeify(require('request'));
66

77
const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp;
88

9-
describe('FastBoot config', function() {
9+
describe('FastBoot config', function () {
1010
this.timeout(400000);
1111

1212
let app;
1313

14-
before(function() {
14+
before(function () {
1515
app = new AddonTestApp();
1616

17-
return app.create('fastboot-config', { emberVersion: 'latest'})
18-
.then(function() {
17+
return app
18+
.create('fastboot-config', {
19+
skipNpm: true,
20+
emberVersion: 'latest',
21+
emberDataVersion: '~3.19.0',
22+
})
23+
.then(function () {
24+
app.editPackageJSON((pkg) => {
25+
delete pkg.devDependencies['ember-fetch'];
26+
});
27+
return app.run('npm', 'install');
28+
})
29+
.then(function () {
1930
return app.startServer({
20-
command: 'serve'
31+
command: 'serve',
2132
});
2233
});
2334
});
2435

25-
after(function() {
36+
after(function () {
2637
return app.stopServer();
2738
});
2839

29-
it('provides sandbox globals', function() {
40+
it('provides sandbox globals', function () {
3041
return request({
3142
url: 'http://localhost:49741/',
3243
headers: {
33-
'Accept': 'text/html'
34-
}
35-
})
36-
.then(function(response) {
37-
expect(response.statusCode).to.equal(200);
38-
expect(response.headers['content-type']).to.equalIgnoreCase('text/html; charset=utf-8');
39-
expect(response.body).to.contain('<h1>My Global</h1>');
40-
});
44+
Accept: 'text/html',
45+
},
46+
}).then(function (response) {
47+
expect(response.statusCode).to.equal(200);
48+
expect(response.headers['content-type']).to.equalIgnoreCase(
49+
'text/html; charset=utf-8'
50+
);
51+
expect(response.body).to.contain('<h1>My Global</h1>');
52+
});
4153
});
4254
});

packages/ember-cli-fastboot/test/fastboot-location-config-test.js

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,62 @@ const request = RSVP.denodeify(require('request'));
66

77
const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp;
88

9-
describe('FastBootLocation Configuration', function() {
9+
describe('FastBootLocation Configuration', function () {
1010
this.timeout(300000);
1111

1212
let app;
1313

14-
before(function() {
14+
before(function () {
1515
app = new AddonTestApp();
1616

17-
return app.create('fastboot-location-config', { emberVersion: 'latest'})
18-
.then(function() {
17+
return app
18+
.create('fastboot-location-config', {
19+
skipNpm: true,
20+
emberVersion: 'latest',
21+
emberDataVersion: '~3.19.0',
22+
})
23+
.then(function () {
24+
app.editPackageJSON((pkg) => {
25+
delete pkg.devDependencies['ember-fetch'];
26+
});
27+
return app.run('npm', 'install');
28+
})
29+
.then(function () {
1930
return app.startServer({
20-
command: 'serve'
31+
command: 'serve',
2132
});
2233
});
2334
});
2435

25-
after(function() {
36+
after(function () {
2637
return app.stopServer();
2738
});
2839

29-
it('should use the redirect code provided by the EmberApp', function() {
40+
it('should use the redirect code provided by the EmberApp', function () {
3041
return request({
3142
url: 'http://localhost:49741/redirect-on-transition-to',
3243
followRedirect: false,
3344
headers: {
34-
Accept: 'text/html'
35-
}
36-
}).then(function(response) {
45+
Accept: 'text/html',
46+
},
47+
}).then(function (response) {
3748
if (response.statusCode === 500) throw new Error(response.body);
3849
expect(response.statusCode).to.equal(302);
39-
expect(response.headers.location).to.equal('//localhost:49741/test-passed');
50+
expect(response.headers.location).to.equal(
51+
'//localhost:49741/test-passed'
52+
);
4053
});
4154
});
4255

43-
describe('when fastboot.fastbootHeaders is false', function() {
44-
it('should not send the "x-fastboot-path" header on a redirect', function() {
56+
describe('when fastboot.fastbootHeaders is false', function () {
57+
it('should not send the "x-fastboot-path" header on a redirect', function () {
4558
return request({
4659
url: 'http://localhost:49741/redirect-on-transition-to',
4760
followRedirect: false,
4861
headers: {
49-
Accept: 'text/html'
50-
}
51-
}).then(function(response) {
62+
Accept: 'text/html',
63+
},
64+
}).then(function (response) {
5265
if (response.statusCode === 500) throw new Error(response.body);
5366
expect(response.headers).to.not.include.keys(['x-fastboot-path']);
5467
});

packages/ember-cli-fastboot/test/fastboot-location-test.js

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,44 @@ const request = RSVP.denodeify(require('request'));
66

77
const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp;
88

9-
describe('FastBootLocation', function() {
9+
describe('FastBootLocation', function () {
1010
this.timeout(300000);
1111

1212
let app;
13-
before(function() {
13+
before(function () {
1414
app = new AddonTestApp();
1515

16-
return app.create('fastboot-location', { emberVersion: 'latest'})
17-
.then(function() {
16+
return app
17+
.create('fastboot-location', {
18+
skipNpm: true,
19+
emberVersion: 'latest',
20+
emberDataVersion: '~3.19.0',
21+
})
22+
.then(function () {
23+
app.editPackageJSON((pkg) => {
24+
delete pkg.devDependencies['ember-fetch'];
25+
});
26+
return app.run('npm', 'install');
27+
})
28+
.then(function () {
1829
return app.startServer({
19-
command: 'serve'
30+
command: 'serve',
2031
});
2132
});
2233
});
2334

24-
after(function() {
35+
after(function () {
2536
return app.stopServer();
2637
});
2738

28-
it('should NOT redirect when no transition is called', function() {
39+
it('should NOT redirect when no transition is called', function () {
2940
return request({
3041
url: 'http://localhost:49741/my-root/test-passed',
3142
followRedirect: false,
3243
headers: {
33-
Accept: 'text/html'
34-
}
35-
}).then(function(response) {
44+
Accept: 'text/html',
45+
},
46+
}).then(function (response) {
3647
if (response.statusCode === 500) throw new Error(response.body);
3748
expect(response.statusCode).to.equal(200);
3849

@@ -46,15 +57,14 @@ describe('FastBootLocation', function() {
4657
});
4758
});
4859

49-
it('should NOT redirect when intermediateTransitionTo is called', function() {
60+
it('should NOT redirect when intermediateTransitionTo is called', function () {
5061
return request({
51-
url:
52-
'http://localhost:49741/my-root/redirect-on-intermediate-transition-to',
62+
url: 'http://localhost:49741/my-root/redirect-on-intermediate-transition-to',
5363
followRedirect: false,
5464
headers: {
55-
Accept: 'text/html'
56-
}
57-
}).then(function(response) {
65+
Accept: 'text/html',
66+
},
67+
}).then(function (response) {
5868
if (response.statusCode === 500) throw new Error(response.body);
5969
expect(response.statusCode).to.equal(200);
6070

@@ -69,14 +79,14 @@ describe('FastBootLocation', function() {
6979
});
7080
});
7181

72-
it('should redirect when transitionTo is called', function() {
82+
it('should redirect when transitionTo is called', function () {
7383
return request({
7484
url: 'http://localhost:49741/my-root/redirect-on-transition-to',
7585
followRedirect: false,
7686
headers: {
77-
Accept: 'text/html'
78-
}
79-
}).then(function(response) {
87+
Accept: 'text/html',
88+
},
89+
}).then(function (response) {
8090
if (response.statusCode === 500) throw new Error(response.body);
8191
expect(response.statusCode).to.equal(307);
8292

@@ -92,14 +102,14 @@ describe('FastBootLocation', function() {
92102
});
93103
});
94104

95-
it('should redirect when replaceWith is called', function() {
105+
it('should redirect when replaceWith is called', function () {
96106
return request({
97107
url: 'http://localhost:49741/my-root/redirect-on-replace-with',
98108
followRedirect: false,
99109
headers: {
100-
Accept: 'text/html'
101-
}
102-
}).then(function(response) {
110+
Accept: 'text/html',
111+
},
112+
}).then(function (response) {
103113
if (response.statusCode === 500) throw new Error(response.body);
104114
expect(response.statusCode).to.equal(307);
105115

@@ -115,14 +125,14 @@ describe('FastBootLocation', function() {
115125
});
116126
});
117127

118-
it('should NOT redirect when transitionTo is called with identical route name', function() {
128+
it('should NOT redirect when transitionTo is called with identical route name', function () {
119129
return request({
120130
url: 'http://localhost:49741/my-root/noop-transition-to',
121131
followRedirect: false,
122132
headers: {
123-
Accept: 'text/html'
124-
}
125-
}).then(function(response) {
133+
Accept: 'text/html',
134+
},
135+
}).then(function (response) {
126136
if (response.statusCode === 500) throw new Error(response.body);
127137
expect(response.statusCode).to.equal(200);
128138

@@ -136,14 +146,14 @@ describe('FastBootLocation', function() {
136146
});
137147
});
138148

139-
it('should NOT redirect when replaceWith is called with identical route name', function() {
149+
it('should NOT redirect when replaceWith is called with identical route name', function () {
140150
return request({
141151
url: 'http://localhost:49741/my-root/noop-replace-with',
142152
followRedirect: false,
143153
headers: {
144-
Accept: 'text/html'
145-
}
146-
}).then(function(response) {
154+
Accept: 'text/html',
155+
},
156+
}).then(function (response) {
147157
if (response.statusCode === 500) throw new Error(response.body);
148158
expect(response.statusCode).to.equal(200);
149159

packages/ember-cli-fastboot/test/new-package-json-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const expect = require('chai').expect;
55
const helpers = require('broccoli-test-helper');
66
const createBuilder = helpers.createBuilder;
77
const createTempDir = helpers.createTempDir;
8-
const co = require('co');
98
const FastbootConfig = require('../lib/broccoli/fastboot-config');
109

1110
describe('FastbootConfig', function() {

0 commit comments

Comments
 (0)