Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 93 additions & 41 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,115 @@
version: 2.1

orbs:
node: circleci/node@4.2.0

defaults: &defaults
docker:
- image: circleci/node:10-browsers
environment:
JOBS: 1
node: circleci/node@4.7.0

jobs:
prepare:
<<: *defaults
test:
docker:
- image: circleci/node:12-browsers
steps:
- checkout
- node/install-packages:
pkg-manager: "yarn"
cache-version: "v1"
include-branch-in-cache-key: false
- run:
name: Generate reports folder
command: mkdir reports
- persist_to_workspace:
root: .
paths:
- .

lint:
<<: *defaults
steps:
- attach_workspace:
at: .
pkg-manager: yarn
- run:
name: Lint Handlebars
command: yarn lint:hbs
name: Lint
command: yarn lint
- run:
name: Lint JavaScript
command: yarn lint:js
name: Run Tests
command: yarn test:ember

test:
<<: *defaults
floating:
docker:
- image: circleci/node:12-browsers
steps:
- attach_workspace:
at: .
- checkout
- node/install-packages:
pkg-manager: yarn
override-ci-command: yarn install --no-lockfile
- run:
name: Run Tests
command: yarn test:ember

try-scenarios:
docker:
- image: circleci/node:12-browsers
parameters:
scenario:
type: enum
enum:
[
"ember-lts-3.24",
"ember-lts-3.28",
"ember-release",
"ember-beta",
"ember-canary",
"ember-classic",
"ember-default-with-jquery",
"embroider-safe",
"embroider-optimized",
]
steps:
- checkout
- node/install-packages:
pkg-manager: yarn
- run:
name: Generate reports folder
command: mkdir reports
- run:
name: Run << parameters.scenario >> Tests
command: yarn ember try:one << parameters.scenario >> --skip-cleanup=true
- store_test_results:
path: "reports"
- store_artifacts:
path: "reports"

workflows:
build_and_test:
tests:
jobs:
- prepare
- lint:
- test
- floating:
requires:
- test
- try-scenarios:
name: test-ember-lts-3.24
scenario: ember-lts-3.24
requires:
- test
- try-scenarios:
name: test-ember-lts-3.28
scenario: ember-lts-3.28
requires:
- test
- try-scenarios:
name: test-ember-release
scenario: ember-release
requires:
- test
- try-scenarios:
name: test-ember-beta
scenario: ember-beta
requires:
- test
- try-scenarios:
name: test-ember-canary
scenario: ember-canary
requires:
- test
- try-scenarios:
name: test-ember-classic
scenario: ember-classic
requires:
- test
- try-scenarios:
name: test-ember-default-with-jquery
scenario: ember-default-with-jquery
requires:
- test
- try-scenarios:
name: test-embroider-safe
scenario: embroider-safe
requires:
- prepare
- test:
- test
- try-scenarios:
name: test-embroider-optimized
scenario: embroider-optimized
requires:
- prepare
- test
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
Expand Down
29 changes: 14 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,15 @@ module.exports = {
// node files
{
files: [
'.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/**',
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -50,5 +44,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
Expand All @@ -24,6 +26,7 @@
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: 'octane',
extends: 'recommended',
};
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

## Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`
* `yarn lint`
* `yarn lint:fix`

## Running tests

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ After the install dependencies job, the `node_modules` folder is cached by Circl

It will provides a `test_and_build` workflow, as follows:

![prepare / run lint (js and hbs) / run tests (default)](https://raw.githubusercontent.com/GreatWizard/ember-circleci/master/doc/workflow-app.png)
![prepare / run lint / run tests (default)](https://raw.githubusercontent.com/GreatWizard/ember-circleci/master/doc/workflow-app.png)

### Configuration for addon

It will provides a `test_matrix` workflow, as follows:

![prepare / run lint (js and hbs) and tests (default) / run tests (LTS 3.16, LTS 3.20, release, beta, canary, default with jquery and classic)](https://raw.githubusercontent.com/GreatWizard/ember-circleci/master/doc/workflow-addon.png)
![prepare / run lint and tests (default) / run tests (LTS 3.20, LTS 3.24, release, beta, canary, default with jquery, classic, embroider-safe, embroider-optimized)](https://raw.githubusercontent.com/GreatWizard/ember-circleci/master/doc/workflow-addon.png)

## Contributing

Expand Down
Loading