Skip to content

Commit

Permalink
chore: extract test-app into own package
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeAstapov committed May 23, 2022
1 parent 10c0e83 commit 355c1e0
Show file tree
Hide file tree
Showing 49 changed files with 908 additions and 738 deletions.
29 changes: 23 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ concurrency:
cancel-in-progress: true

jobs:
lint:
name: Lint
lint-addon:
name: Lint Addon
runs-on: ubuntu-latest
timeout-minutes: 20

Expand All @@ -27,9 +27,26 @@ jobs:
cache: yarn

- run: yarn install --frozen-lockfile

- name: Lint
run: yarn workspace ember-cookies run lint

lint-test-app:
name: Lint Test App
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12.x
cache: yarn

- run: yarn install --frozen-lockfile

- name: Lint
run: yarn lint:js
working-directory: packages/ember-cookies
run: yarn workspace test-app run lint

tests:
name: Tests
Expand Down Expand Up @@ -67,7 +84,7 @@ jobs:
- name: tests
run: yarn test:one ${{ matrix.test-suite }}
continue-on-error: ${{matrix.allow-failure}}
working-directory: packages/ember-cookies
working-directory: packages/test-app

extra-tests:
name: Tests (Floating Dependencies)
Expand All @@ -86,4 +103,4 @@ jobs:
- name: tests
run: yarn test
continue-on-error: true
working-directory: packages/ember-cookies
working-directory: packages/test-app
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# misc
npm-debug.log*
yarn-error.log
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"version": "0.5.2",
"private": true,
"repository": "https://github.com/simplabs/ember-cookies",
"license": "MIT",
"workspaces": [
"packages/*"
],
"repository": "https://github.com/simplabs/ember-cookies"
"scripts": {
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:addon": "yarn workspace ember-cookies run lint",
"lint:test-app": "yarn workspace test-app run lint",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:fix:*",
"lint:fix:addon": "yarn workspace ember-cookies run lint:fix",
"lint:fix:test-app": "yarn workspace test-app run lint:fix"
},
"devDependencies": {
"npm-run-all": "^4.1.5"
}
}
13 changes: 1 addition & 12 deletions packages/ember-cookies/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ module.exports = {
'.eslintrc.js',
'**/.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
],
excludedFiles: ['addon/**', 'addon-test-support/**', 'app/**', 'tests/dummy/app/**'],
excludedFiles: ['addon/**', 'addon-test-support/**'],
parserOptions: {
sourceType: 'script',
},
Expand All @@ -43,12 +39,5 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
// test files
{
files: ['tests/**/*-test.js'],
excludedFiles: ['tests/dummy/**'],
plugins: ['qunit'],
extends: ['plugin:qunit/recommended'],
},
],
};
18 changes: 0 additions & 18 deletions packages/ember-cookies/ember-cli-build.js

This file was deleted.

48 changes: 3 additions & 45 deletions packages/ember-cookies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,63 +13,22 @@
},
"repository": "https://github.com/simplabs/ember-cookies",
"scripts": {
"build": "ember build",
"lint": "yarn lint:js",
"lint:js": "eslint . --cache",
"nodetest": "node node-tests/runner.js",
"start": "ember server",
"test": "ember test",
"test:all": "ember try:each",
"test:one": "ember try:one"
"lint:js:fix": "eslint . --fix"
},
"dependencies": {
"ember-cli-babel": "^7.26.3",
"ember-native-class-polyfill": "^1.0.6"
},
"devDependencies": {
"@babel/eslint-parser": "^7.17.0",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.5.0",
"@embroider/test-setup": "1.6.0",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"broccoli-asset-rev": "^3.0.0",
"chai": "^4.1.0",
"ember-auto-import": "^2.4.0",
"ember-cli": "~4.3.0",
"ember-cli-chai": "^0.5.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-fastboot": "^3.2.0-beta.4",
"ember-cli-fastboot-testing": "^0.6.0",
"ember-cli-htmlbars": "^6.0.0",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-page-title": "^7.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.2",
"ember-sinon": "5.0.0",
"ember-source": "~4.4.0",
"ember-source-channel-url": "^3.0.0",
"ember-try": "^2.0.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-ember": "^10.3.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0",
"glob": "^8.0.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "2.6.2",
"qunit": "^2.16.0",
"request": "^2.88.2",
"rsvp": "^4.8.5",
"symlink-or-copy": "^1.1.8",
"webpack": "^5.70.0"
"prettier": "2.6.2"
},
"engines": {
"node": ">= 12.*"
Expand All @@ -78,7 +37,6 @@
"edition": "octane"
},
"ember-addon": {
"configPath": "tests/dummy/config",
"versionCompatibility": {
"ember": ">=3.4"
}
Expand Down
12 changes: 0 additions & 12 deletions packages/ember-cookies/tests/dummy/.eslintrc.js

This file was deleted.

21 changes: 0 additions & 21 deletions packages/ember-cookies/tests/dummy/config/ember-cli-update.json

This file was deleted.

9 changes: 9 additions & 0 deletions packages/test-app/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { buildEmberPlugins } = require('ember-cli-babel');

module.exports = function (api) {
api.cache(true);

return {
plugins: [...buildEmberPlugins(__dirname)],
};
};
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions packages/test-app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/node-tests/fixtures/

# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
53 changes: 53 additions & 0 deletions packages/test-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
'use strict';

module.exports = {
root: true,
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
},
},
plugins: ['ember'],
extends: ['eslint:recommended', 'plugin:ember/recommended', 'plugin:prettier/recommended'],
env: {
browser: true,
},
rules: {
'ember/no-classic-classes': 'off',
},
overrides: [
// node files
{
files: [
'.babelrc.js',
'.eslintrc.js',
'**/.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
],
excludedFiles: ['app/**'],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
// test files
{
files: ['tests/**/*-test.js'],
plugins: ['qunit'],
extends: ['plugin:qunit/recommended'],
},
],
};
24 changes: 24 additions & 0 deletions packages/test-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp

# dependencies
/node_modules
/bower_components

# misc
/.eslintcache
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
.DS_Store

# ember-try
.node_modules.ember-try/
package.json.ember-try
18 changes: 18 additions & 0 deletions packages/test-app/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/.node_modules.ember-try
/bower_components
/config/ember-try.js
/dist
/node-tests
/tests
/tmp
**/.gitkeep
.babelrc.js
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.watchmanconfig
bower.json
ember-cli-build.js
testem.js
9 changes: 9 additions & 0 deletions packages/test-app/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

module.exports = {
printWidth: 100,
semi: true,
arrowParens: 'avoid',
singleQuote: true,
trailingComma: 'es5',
};
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from 'dummy/config/environment';
import config from 'test-app/config/environment';

export default class App extends Application {
modulePrefix = config.modulePrefix;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 355c1e0

Please sign in to comment.