Skip to content

Commit

Permalink
Run a subset of commands in Windows CI as a smoke-test
Browse files Browse the repository at this point in the history
  • Loading branch information
kategengler committed Oct 31, 2016
1 parent 30477e1 commit f996666
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
47 changes: 47 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# http://www.appveyor.com/docs/appveyor-yml

# Test against these versions of Node.js.
environment:
MOCHA_REPORTER: "mocha-appveyor-reporter"
matrix:
- nodejs_version: "6"

# Install scripts. (runs after repo cloning)
install:
- git rev-parse HEAD
# Get the latest stable version of Node 0.STABLE.latest
- ps: Install-Product node $env:nodejs_version
# Install PhantomJS
- npm install phantomjs-prebuilt
- npm install mocha-appveyor-reporter
- npm install -g bower
# Typical npm stuff.
- npm version
- npm install
- bower install
- npm link
- npm link ember-try

cache:
- '%APPDATA%\npm-cache'
- '%APPDATA%\Roaming\bower'


# Post-install test scripts.
test_script:
# Output useful info for debugging.
- npm version
- cmd: node_modules/.bin/ember try:each
- cmd: node_modules/.bin/ember try:ember "> 1.13.0 < 2.0.0"
- cmd: node_modules/.bin/ember try:config --config-path="test/fixtures/dummy-ember-try-config.js"
- cmd: node_modules/.bin/ember try:one default
- cmd: node_modules/.bin/ember try:one default --- ember help
- cmd: node_modules/.bin/ember try:one test1 --config-path="test/fixtures/dummy-ember-try-config.js"
- cmd: node_modules/.bin/ember try:one default --skip-cleanup --- ember help --json
- cmd: node_modules/.bin/ember try:reset

# Don't actually build.
build: off

# Set build version format here instead of in the admin panel.
version: "{build}"
2 changes: 2 additions & 0 deletions lib/commands/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
var debug = require('debug')('ember-try:commands:config');

module.exports = {
name: 'try:config',
Expand All @@ -10,6 +11,7 @@ module.exports = {

run: function(commandOptions) {
var command = this;
debug('Options:\n', commandOptions);
var getConfig = require('../utils/config')({ project: this.project, configPath: commandOptions.configPath });
return getConfig.then(function(config) {
command.ui.writeLine(JSON.stringify(config, null, 2));
Expand Down
3 changes: 3 additions & 0 deletions lib/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var fs = require('fs');
var extend = require('extend');
var RSVP = require('rsvp');
var findByName = require('./find-by-name');
var debug = require('debug')('ember-try:utils:config');

function config(options) {
var relativePath = options.configPath || path.join('config', 'ember-try.js');
Expand All @@ -17,6 +18,8 @@ function config(options) {
if (typeof configData === 'function') {
configData = configData(options.project);
}
} else {
debug('Config file does not exist %s', configFile);
}

if (configData && configData.scenarios && !configData.useVersionCompatibility && !options.versionCompatibility) {
Expand Down

0 comments on commit f996666

Please sign in to comment.