Skip to content

Commit c0d7240

Browse files
committed
merging artifacts
2 parents 1f1112e + a013dc7 commit c0d7240

File tree

13 files changed

+107
-64
lines changed

13 files changed

+107
-64
lines changed

.c9build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# Build
4+
npm install -g gulp
5+
npm install
6+
7+
# Analysis
8+
9+
# Test
10+
gulp build
11+
12+
# Publish
13+
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
14+
CI_REPORTS=$PWD/test/reports testspace publish @.testspace master.c9

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
node_modules
22
npm-debug.log
33
debug
4-
.idea
5-
6-
test/reports/
4+
.idea

.testspace

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Test Content files to publish
2+
3+
# "Static Analyis"
4+
$CI_REPORTS/jscs.xml
5+
$CI_REPORTS/jshint.xml
6+
7+
# "Tests"
8+
[Tests]$CI_REPORTS/junitresults.xml{test}
9+
10+
# "Code Coverage"
11+
$CI_REPORTS/coverage/clover.xml
12+
[Code Coverage]+$CI_REPORTS/coverage/clover.xml{attaching actual content for example only}

.testspace.xml

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

.travis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
language: node_js
22
node_js:
33
- "4.0"
4+
45
before_script:
5-
# Install Testspace Runner
6-
- ./testspace_install.sh
7-
- export PATH="${HOME}/testspace:${PATH}"
86
- npm install -g gulp
7+
- npm install
98

109
script:
1110
- gulp build
12-
# Publish Test Results along with Coverage
13-
- testspace publish [Tests]test/reports/junitresults.xml{test} test/reports/coverage/clover.xml ${TESTSPACE_URL}
11+
12+
after_script:
13+
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
14+
- CI_REPORTS=$PWD/test/reports testspace publish @.testspace $TESTSPACE_TOKEN/${TRAVIS_BRANCH}#travis.Build.${TRAVIS_BUILD_NUMBER}
15+

circle.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
machine:
2+
node:
3+
version: 4.0
4+
5+
test:
6+
override:
7+
- npm install -g gulp
8+
- npm install
9+
- gulp build
10+
11+
post:
12+
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
13+
- CI_REPORTS=$PWD/test/reports testspace publish @.testspace $TESTSPACE_TOKEN/${CIRCLE_BRANCH}#circle.Build.${CIRCLE_BUILD_NUM}

gulpfile.js

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ var jasmine = require('gulp-jasmine');
66
var istanbul = require('gulp-istanbul');
77
var reporters = require('jasmine-reporters');
88
var stylish = require('jshint-stylish');
9+
var jshintXMLReporter = require('gulp-jshint-xml-file-reporter');
910
var jscs = require('gulp-jscs');
11+
var jscs = require('gulp-jscs-custom');
1012
var isWin = /^win/.test(process.platform);
1113

1214
gulp.task('jsdoc', shell.task([
@@ -17,9 +19,13 @@ gulp.task('jsdoc', shell.task([
1719

1820
gulp.task('lint', function () {
1921
return gulp.src(['./src/**/*.js'], ['./test/**/*.js'])
20-
.pipe(jshint())
21-
.pipe(jshint.reporter(stylish))
22-
.pipe(jshint.reporter('fail'));
22+
.pipe(jshint())
23+
.pipe(jshint.reporter(jshintXMLReporter))
24+
.on('end', jshintXMLReporter.writeFile({
25+
format: 'checkstyle',
26+
filePath: './test/reports/jshint.xml',
27+
alwaysReport: 'true'
28+
}));
2329
});
2430

2531
gulp.task('pre-test', function () {
@@ -40,13 +46,20 @@ gulp.task('test', ['pre-test'], function () {
4046
// Creating the reports after tests ran
4147
.pipe(istanbul.writeReports({
4248
dir: './test/reports/coverage',
43-
reporters: ['clover', 'cobertura']
49+
reporters: ['clover']
4450
}));
4551
});
4652

4753
gulp.task('jscs', function () {
4854
return gulp.src(['src/**/*.js', 'test/**/*.js'])
49-
.pipe(jscs());
55+
.pipe(jscs({
56+
esnext: false,
57+
configPath: '.jscsrc',
58+
reporter: 'checkstyle',
59+
filePath: './test/reports/jscs.xml',
60+
failOnError: false
61+
}));
5062
});
5163

64+
5265
gulp.task('build', ['lint', 'jscs', 'test']);

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"gulp-istanbul": "^0.10.4",
1212
"gulp-jasmine": "^2.0.1",
1313
"gulp-jscs": "^1.4.0",
14+
"gulp-jscs-custom": "^0.1.6",
1415
"gulp-jshint": "^1.9.0",
16+
"gulp-jshint-xml-file-reporter": "^0.5.1",
1517
"gulp-shell": "^0.2.11",
1618
"jasmine-reporters": "^2.0.0",
1719
"jsdoc": "3.4.0",

readme.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,28 @@
55

66
Sample demonstrates techniques for using Testspace with Javascript code and the [Jasmine test framework](http://jasmine.github.io/) together with [Istanbul code coverage tool](https://gotwarlost.github.io/istanbul/) and [Gulp JS build system](http://gulpjs.com/).
77

8+
<<<<<<< HEAD
89
[![Build Status](https://travis-ci.org/testspace-samples/javascript.jasmine.svg?branch=master)](https://travis-ci.org/testspace-samples/php.phpunit)
910
[![Space Health](https://samples.testspace.com/projects/89/spaces/298/badge)](https://samples.testspace.com/projects/89/spaces/298 "Test Cases")
1011
[![Space Metric](https://samples.testspace.com/projects/89/spaces/298/metrics/191/badge)](https://samples.testspace.com/projects/89/spaces/298/metrics#metric-191 "Line/Statement Coverage")
1112
[![Space Metric](https://samples.testspace.com/projects/89/spaces/298/metrics/198/badge)](https://samples.testspace.com/projects/89/spaces/298/metrics#metric-198 "Branch/Condition Coverage")
13+
=======
14+
***
15+
Using Multiple Online CI Services:
16+
>>>>>>> a013dc7c3178034dd4a96e819734628839d8c4bf
1217
18+
[![Build Status](https://travis-ci.org/munderseth/javascript.jasmine.svg?branch=master)](https://travis-ci.org/munderseth/javascript.jasmine)
19+
[![CircleCI](https://circleci.com/gh/munderseth/javascript.jasmine.svg?style=svg)](https://circleci.com/gh/munderseth/javascript.jasmine)
20+
[![Run Status](https://api.shippable.com/projects/576c51343be4f4faa56a78e5/badge?branch=master)](https://app.shippable.com/projects/576c51343be4f4faa56a78e5)
21+
22+
23+
***
24+
Publising **Test Content** using www.testspace.com
25+
26+
[![Space Health](http://munderseth.stridespace.com/projects/278/spaces/910/badge)](http://munderseth.stridespace.com/projects/278/spaces/910 "Test Cases")
27+
[![Space Metric](http://munderseth.stridespace.com/projects/278/spaces/910/metrics/363/badge)](http://munderseth.stridespace.com/spaces/910/schema/Code%20Coverage "Code Coverage (branches)")
28+
[![Space Metric](http://munderseth.stridespace.com/projects/278/spaces/911/metrics/367/badge)](http://munderseth.stridespace.com/spaces/911/schema/Code%20Coverage "Code Coverage (methods)")
29+
[![Space Metric](http://munderseth.stridespace.com/projects/278/spaces/911/metrics/390/badge)](http://munderseth.stridespace.com/spaces/911/schema/Static%20Analysis "Static Analysis (issues)")
1330

1431
***
1532

@@ -25,17 +42,23 @@ gulp build
2542
Publishing results example:
2643

2744
<pre>
28-
testspace publish [Tests]test/reports/junitresults.xml{test} test/reports/coverage/clover.xml
45+
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
46+
CI_REPORTS=$PWD/test/reports testspace publish @.testspace $TESTSPACE_TOKEN/$BRANCH_NAME
2947
</pre>
3048

31-
Checkout the [Space](https://samples.testspace.com/projects/javascript/spaces/jasmine).
49+
Checkout the [Space](http://munderseth.stridespace.com/projects/javascript.jasmine/spaces/master).
3250

3351
***
3452

35-
To fork this example using Travis requires:
53+
To replicate this sample:
3654
- Account at www.testspace.com.
37-
- Travis Environment Variable:
38-
- `TESTSPACE_URL` = `credentials:@my-org-name.testspace.com/my-project/my-space`
55+
- Environment Variable called `TESTSPACE_TOKEN`:
3956
- `credentials` set to `username:password` or your [access token](http://help.testspace.com/using-your-organization:user-settings).
4057
- `my-org-name.testspace.com/my-project/my-space` based on your subdomain, project, and space names. Refer [here](http://help.testspace.com/reference:runner-reference#login-credentials) for more details.
58+
<<<<<<< HEAD
4159

60+
=======
61+
62+
63+
64+
>>>>>>> a013dc7c3178034dd4a96e819734628839d8c4bf

shippable.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@ node_js:
55

66
env:
77
global:
8-
- secure: RxFIwZUbf+Kec/kF37Iu8YaekLQDCjDP2YTCbqLi4mNHsbc4WRohUGXXYgCS6wSV8vEW3ditOFhTx/rchMJdJRonL1fNI6hSVLbFU39RGB/vhJXTGE8oU9dV0bK1a3vPmSoyWIhbODhS751nAlgMgd0U6QNxhRE/3SLuiD3pTGbV5XY13iJGzNIijCrrIu0FfgfNwkf5ezJBW+lzd/Cr5PJyu+mwRv3L5WPmhDslr6KGh4gkxnu+o1pa0x/S+M7YIQ+uy+5Y5N4pSS3TboVfsufrkCGI8CPr5WZjnKbejeN88kIUxSxEu0+xOo1vNX29uwh98HGpGcbmwSQgbUtFow==
9-
10-
before_script:
11-
- ./testspace_install.sh
12-
- export PATH="${HOME}/testspace:${PATH}"
13-
- mkdir -p shippable/codecoverage
14-
- mkdir -p shippable/testresults
8+
- secure: cfRsskJX4S4Mu+b4jsfmmWKNYPDrumKQh8TKa1kIlNh3R2nU7GIEeDe/G/lvfN9dtyZJBuXxrn1pSV+rdjHlyc6iF+/6KyBnnLvf0tfQvxuArKsUia3ieAvQ0vt3Ibk8wuzlLkc0JYy62p89d14KTDz1RrHE0qY9QhGoHr40aOQtXpj2lzOhE+mzPqqGl89ix7kEKQ0o8vYMe/j1o7Q7lzQJN4e7Tv+7DCjs68TzcIftXvdtfTvK3WiND3TVNF+lgogRxFd15a89ZXVDGATXfoQcOkJLpie6DN9MyKOLAWdXX39bMn5+C3EGo6WNsrXOEI8co+GXnN6whyMdUhMBYA==
9+
1510
script:
16-
- testspace import .testspace.xml ${TESTSPACE_URL}
17-
- testspace run ${TESTSPACE_URL}
11+
- npm install -g gulp
12+
- npm install
13+
- gulp build
1814

1915
after_script:
20-
- cp test/reports/junitresults.xml shippable/testresults
21-
- cp test/reports/coverage/clover.xml shippable/codecoverage
16+
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
17+
- CI_REPORTS=$PWD/test/reports testspace publish @.testspace $TESTSPACE_TOKEN/${BRANCH}#ship.Build.${BUILD_NUMBER}

0 commit comments

Comments
 (0)