Skip to content

Commit 81f0073

Browse files
committed
updates for new release
1 parent 062c9d4 commit 81f0073

File tree

6 files changed

+52
-53
lines changed

6 files changed

+52
-53
lines changed

.c9build.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ npm install
66
# Analysis and Test
77
make lint test
88

9-
# Push content
10-
11-
## Requires TESTSPACE_TOKEN = $ACCESS_TOKEN:@samples.testspace.com.
9+
# Download and configure the Testspace client
10+
mkdir -p $HOME/bin
11+
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
12+
CI=true testspace config url samples.testspace.com
13+
testspace -v
1214

13-
BRANCH_NAME=`git symbolic-ref --short HEAD`
14-
GIT_URL=`git remote show origin -n | grep Fetch\ URL: | sed 's/.*URL: //'`
15-
REPO_SLUG=`echo ${GIT_URL#*github.com?} | sed 's/.git//'`
16-
17-
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
18-
testspace @.testspace.txt $TESTSPACE_TOKEN/${REPO_SLUG/\//:}/${BRANCH_NAME}#c9.Build
15+
# Push content
16+
testspace checkstyle.xml [Tests]xunit.xml{test} coverage/cobertura-coverage.xml "#c9.Build" --repo git

.testspace.txt

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

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ node_js:
33
- "4.0"
44

55
before_script:
6+
- mkdir -p $HOME/bin
7+
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
8+
- testspace config url samples.testspace.com
9+
- testspace -v
610
- npm install
711

812
script:
913
- make lint test
1014

1115
# Requires TESTSPACE_TOKEN environment variable.
1216
after_script:
13-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
14-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${TRAVIS_REPO_SLUG/\//:}/${TRAVIS_BRANCH}#travis.Build.${TRAVIS_BUILD_NUMBER}
15-
17+
- testspace checkstyle.xml [Tests]xunit.xml{test} coverage/cobertura-coverage.xml

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
[![Testspace](http://www.testspace.com/img/Testspace.png)](http://www.testspace.com)
1+
[![Testspace](https://www.testspace.com/img/Testspace.png)](https://www.testspace.com)
22

33
***
44

55
## JavaScript/Mocha sample for demonstrating Testspace based on the [nodejs-tdd-boilerplate](https://github.com/BryanDonovan/nodejs-tdd-boilerplate)
66

77
Sample demonstrates techniques for using Testspace with Javascript code and the [Mocha test framework](https://mochajs.org/) together with [Istanbul code coverage tool](https://gotwarlost.github.io/istanbul/).
8-
8+
* Using a Testspace Project that is `connected` with this GitHub Repo
9+
* Using 3 Online CI services for demonstration purposes only
10+
* Can review the Results at [testspace-samples:javascript.mocha](https://samples.testspace.com/projects/testspace-samples:javascript.mocha)
11+
* Refer to our [Getting Started](https://help.testspace.com/getting-started) help articles for more information
912

1013
***
1114
Using Multiple Online CI Services:
@@ -18,33 +21,30 @@ Using Multiple Online CI Services:
1821
***
1922
Publising **Test Content** using www.testspace.com
2023

21-
[![Space Health](https://samples.testspace.com/spaces/799/badge)](https://samples.testspace.com/spaces/799 "Test Cases")
22-
[![Space Metric](https://samples.testspace.com/spaces/799/metrics/743/badge)](https://samples.testspace.com/spaces/799/schema/Code%20Coverage "Code Coverage (branches)")
23-
[![Space Metric](https://samples.testspace.com/spaces/799/metrics/745/badge)](https://samples.testspace.com/spaces/799/schema/Code%20Coverage "Code Coverage (methods)")
24-
[![Space Metric](https://samples.testspace.com/spaces/799/metrics/746/badge)](https://samples.testspace.com/spaces/799/schema/Static%20Analysis "Static Analysis (issues)")
24+
[![Space Health](https://samples.testspace.com/spaces/799/badge?token=496d5e8a418d1a93d098c9143119ea7892546e77)](https://samples.testspace.com/spaces/799 "Test Cases")
25+
[![Space Metric](https://samples.testspace.com/spaces/799/metrics/744/badge?token=589a1e8baba20bafbb94fbfca9992b0321d8ea5a)](https://samples.testspace.com/spaces/799/schema/Code%20Coverage "Code Coverage (lines)")
26+
[![Space Metric](https://samples.testspace.com/spaces/799/metrics/746/badge?token=22a44dbdddf41755f8cd23d41f762a99c72575ef)](https://samples.testspace.com/spaces/799/schema/Static%20Analysis "Static Analysis (issues)")
2527

2628
***
2729

28-
In order to run this sample you will need a host workstation with installed npm.
30+
Download and configure the Testspace client
31+
32+
<pre>
33+
mkdir -p $HOME/bin
34+
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
35+
testspace config url samples.testspace.com
36+
</pre>
37+
38+
39+
Install `npm` and run `make`
2940

3041
<pre>
3142
npm install
3243
make lint test
3344
</pre>
3445

46+
Push Content using Testspace client
47+
3548
<pre>
36-
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
37-
testspace @.testspace.txt $TESTSPACE_TOKEN/$GITHUB_ORG:$REPO_NAME/$BRANCH_NAME#$BUILD_NUMBER
49+
testspace checkstyle.xml [Tests]xunit.xml{test} coverage/cobertura-coverage.xml
3850
</pre>
39-
40-
Checkout the published [Test Content](https://samples.testspace.com/projects/testspace-samples:javascript.mocha). Note that the `.testspace.txt` file contains the [set of files](http://help.testspace.com/how-to:publish-content#publishing-via-content-list-file) to publish.
41-
42-
***
43-
44-
To replicate this sample:
45-
- Setup account at www.testspace.com.
46-
- Create a Environment variable called `TESTSPACE_TOKEN`
47-
- `TESTSPACE_TOKEN` = `credentials@Your-Org-Name.testspace.com`
48-
- `credentials` set to `username:password` or your [access token](http://help.testspace.com/reference:client-reference#login-credentials)
49-
- To [use Testspace with a CI system](http://help.testspace.com/how-to:add-to-ci-workflow), store `TESTSPACE_TOKEN` as a secure environment variable
50-

circle.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
machine:
22
node:
33
version: 4.0
4-
4+
5+
dependencies:
6+
pre:
7+
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
8+
- testspace config url samples.testspace.com
9+
- testspace -v
10+
override:
11+
- npm install
12+
513
test:
614
override:
7-
- npm install
8-
- make lint test
15+
- make lint test
916

10-
# Requires TESTSPACE_TOKEN environment variable.
1117
post:
12-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
13-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${CIRCLE_PROJECT_USERNAME}:${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}#circle.Build.${CIRCLE_BUILD_NUM}
18+
- testspace checkstyle.xml [Tests]xunit.xml{test} coverage/cobertura-coverage.xml

shippable.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@ language: node_js
22

33
node_js:
44
- "4.0"
5-
6-
env:
7-
global:
8-
- secure: tSsmixzDVtqCM09eNDK1fJU6j7MSi3WhnDjTR7RI7WZLNpzuVglHnF2ThURPLaFDhFCAcfK+dt/crDI/R6YCa2aVOU9j6qn4zTt6HZHyG2zA89GWgg/h3D+RtAVasoPfP5WE3wvmnGtPyrXQVAk+wEN3ZvnXlD1TAAosZ/OlMQACW8iaZ1zPXVLeC7/KKtghGl/Cg15Y2RrzuiTa5FvPfibU1b8I/s4L5N2JsF666J/IZzT4+QlNv5YMd2FTwTOMLGHLI3Qq+NwYkRaQapdXYk5tIVu3M1hz7dK1IuBLfRUuoaHHDsY7dviH8rOSXYXtouf30dZILAt1IrIz3opFhg==
9-
5+
106
build:
117
ci:
8+
- mkdir -p $HOME/bin
9+
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
10+
- testspace config url samples.testspace.com
11+
- testspace -v
1212
- npm install
1313
- make lint test
1414

15-
# Requires TESTSPACE_TOKEN environment variable.
1615
on_success:
17-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
18-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}
19-
16+
- testspace checkstyle.xml [Tests]xunit.xml{test} coverage/cobertura-coverage.xml
17+
2018
on_failure:
21-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
22-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}
19+
- testspace checkstyle.xml [Tests]xunit.xml{test} coverage/cobertura-coverage.xml

0 commit comments

Comments
 (0)