Skip to content

Commit 1fd42ba

Browse files
author
Robert Jackson
authored
Merge pull request #775 from kiwiupover/adding-basic-test-app
2 parents fd68eae + 03efc43 commit 1fd42ba

39 files changed

Lines changed: 5005 additions & 243 deletions

.github/workflows/ci.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,38 @@ on:
1919
- cron: '0 6 * * 0'
2020

2121
jobs:
22-
test-mocha:
23-
name: Mocha Tests - ${{ matrix.node-version }}
22+
test-legacy-mocha:
23+
name: Legacy Mocha Tests - ${{ matrix.node-version }}
2424
runs-on: ubuntu-latest
2525

2626
strategy:
27+
fail-fast: false
2728
matrix:
28-
node-version: [12.x, 10.x]
29+
node-version: ['10', '12']
2930

3031
steps:
3132
- name: Checkout Code
3233
uses: actions/checkout@v2
3334
- name: Use Node.js ${{ matrix.node-version }}
34-
uses: actions/setup-node@v1
35+
uses: volta-cli/action@v1
3536
with:
3637
node-version: ${{ matrix.node-version }}
37-
- name: Install NPM version 4
38+
39+
# Remove test-packages folder so that we don't leak node_modules between apps
40+
- name: Remove test-packages
3841
run: |
39-
npm config set spin false
40-
npm install -g npm@4
42+
rm -rf test-packages
4143
- name: Yarn Install
42-
run: yarn install --ignore-engines
44+
working-directory: ./packages/ember-cli-fastboot
45+
run: |
46+
yarn install --ignore-engines --frozen-lockfile
4347
- name: Run Mocha Tests
44-
run: yarn workspace ember-cli-fastboot test:mocha
48+
working-directory: ./packages/ember-cli-fastboot
49+
run: |
50+
volta install npm@4
51+
npm --version
52+
yarn test:mocha
53+
4554
4655
test-ember:
4756
name: Ember Tests
@@ -60,7 +69,28 @@ jobs:
6069
with:
6170
node-version: ${{ matrix.node-version }}
6271
- name: Yarn Install
63-
run: yarn install --ignore-engines
72+
run: yarn install --ignore-engines --frozen-lockfile
6473
- name: Run Tests
6574
run: yarn workspace ember-cli-fastboot test:ember
6675

76+
77+
test-packages:
78+
name: Test Packages
79+
runs-on: ${{ matrix.os }}
80+
81+
strategy:
82+
matrix:
83+
node-version: [12.x, 10.x]
84+
os: [ubuntu-latest, windows-latest]
85+
86+
steps:
87+
- name: Checkout Code
88+
uses: actions/checkout@v2
89+
- name: Use Node.js ${{ matrix.node-version }}
90+
uses: actions/setup-node@v1
91+
with:
92+
node-version: ${{ matrix.node-version }}
93+
- name: Yarn Install
94+
run: yarn install --ignore-engines --frozen-lockfile
95+
- name: Basic App
96+
run: yarn workspace basic-app test:mocha

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Ember FastBoot
22

33
[![npm version](https://badge.fury.io/js/ember-cli-fastboot.svg)](https://badge.fury.io/js/ember-cli-fastboot)
4-
[![Actions Status](hhttps://github.com/ember-fastboot/ember-cli-fastboot/workflows/CI/badge.svg)](https://github.com/ember-fastboot/ember-cli-fastboot/actions)
4+
[![Actions Status](https://github.com/ember-fastboot/ember-cli-fastboot/workflows/CI/badge.svg)](https://github.com/ember-fastboot/ember-cli-fastboot/actions)
55

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"private": true,
44
"workspaces": [
5-
"packages/ember-cli-fastboot"
5+
"packages/ember-cli-fastboot",
6+
"test-packages/basic-app"
67
]
78
}

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

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

test-packages/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Test Packages App
2+
3+
- [Basic App](./test-packages/basic-app) This basic ember app that is fastbooted using ember-cli-fastboot. Most test will be against this basic-app. When an app needs custom ember-cli-fastboot setup another ember app should be added to the test-packages folder.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.hbs]
16+
insert_final_newline = false
17+
18+
[*.{diff,md}]
19+
trim_trailing_whitespace = false

test-packages/basic-app/.ember-cli

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
/**
3+
Ember CLI sends analytics information by default. The data is completely
4+
anonymous, but there are times when you might want to disable this behavior.
5+
6+
Setting `disableAnalytics` to true will prevent any data from being sent.
7+
*/
8+
"disableAnalytics": false
9+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
/vendor/
4+
5+
# compiled output
6+
/dist/
7+
/tmp/
8+
9+
# dependencies
10+
/bower_components/
11+
/node_modules/
12+
13+
# misc
14+
/coverage/
15+
!.*
16+
17+
# ember-try
18+
/.node_modules.ember-try/
19+
/bower.json.ember-try
20+
/package.json.ember-try
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
'use strict';
2+
3+
module.exports = {
4+
root: true,
5+
parser: 'babel-eslint',
6+
parserOptions: {
7+
ecmaVersion: 2018,
8+
sourceType: 'module',
9+
ecmaFeatures: {
10+
legacyDecorators: true
11+
}
12+
},
13+
plugins: [
14+
'ember'
15+
],
16+
extends: [
17+
'eslint:recommended',
18+
'plugin:ember/recommended'
19+
],
20+
env: {
21+
browser: true
22+
},
23+
rules: {},
24+
overrides: [
25+
// node files
26+
{
27+
files: [
28+
'.eslintrc.js',
29+
'.template-lintrc.js',
30+
'ember-cli-build.js',
31+
'testem.js',
32+
'blueprints/*/index.js',
33+
'config/**/*.js',
34+
'lib/*/index.js',
35+
'server/**/*.js'
36+
],
37+
parserOptions: {
38+
sourceType: 'script'
39+
},
40+
env: {
41+
browser: false,
42+
node: true
43+
},
44+
plugins: ['node'],
45+
extends: ['plugin:node/recommended'],
46+
rules: {
47+
// this can be removed once the following is fixed
48+
// https://github.com/mysticatea/eslint-plugin-node/issues/77
49+
'node/no-unpublished-require': 'off'
50+
}
51+
}
52+
]
53+
};

test-packages/basic-app/.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist/
5+
/tmp/
6+
7+
# dependencies
8+
/bower_components/
9+
/node_modules/
10+
11+
# misc
12+
/.env*
13+
/.pnp*
14+
/.sass-cache
15+
/connect.lock
16+
/coverage/
17+
/libpeerconnection.log
18+
/npm-debug.log*
19+
/testem.log
20+
/yarn-error.log
21+
22+
# ember-try
23+
/.node_modules.ember-try/
24+
/bower.json.ember-try
25+
/package.json.ember-try

0 commit comments

Comments
 (0)