Skip to content

Commit 268b9ce

Browse files
committed
new release
1 parent a5e1422 commit 268b9ce

File tree

5 files changed

+55
-48
lines changed

5 files changed

+55
-48
lines changed

.c9build.sh

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@
44
npm install -g gulp
55
npm install
66

7-
# Analysis
8-
9-
# Test
7+
# Analysis and Test
108
gulp build
119

12-
# Push content
13-
14-
## Requires TESTSPACE_TOKEN = $ACCESS_TOKEN:@samples.testspace.com.
15-
16-
BRANCH_NAME=`git symbolic-ref --short HEAD`
17-
GIT_URL=`git remote show origin -n | grep Fetch\ URL: | sed 's/.*URL: //'`
18-
REPO_SLUG=`echo ${GIT_URL#*github.com?} | sed 's/.git//'`
10+
# Download and configure the Testspace client
11+
mkdir -p $HOME/bin
12+
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
13+
CI=true testspace config url samples.testspace.com
1914

20-
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
21-
testspace @.testspace.txt $TESTSPACE_TOKEN/${REPO_SLUG/\//:}/${BRANCH_NAME}#c9.Build
15+
# Push content (refer to ".testspace.txt" for list of content)
16+
testspace @.testspace.txt "#c9.Build" --repo git

.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
69
- npm install -g gulp
710
- npm install
811

912
script:
1013
- gulp build
1114

12-
# Requires TESTSPACE_TOKEN environment variable.
15+
# refer to ".testspace.txt" for list of content
1316
after_script:
14-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
15-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${TRAVIS_REPO_SLUG/\//:}/${TRAVIS_BRANCH}#travis.Build.${TRAVIS_BUILD_NUMBER}
17+
- testspace @.testspace.txt

circle.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +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+
510
test:
611
override:
712
- npm install -g gulp
813
- npm install
914
- gulp build
10-
11-
# Requires TESTSPACE_TOKEN environment variable.
15+
16+
# refer to ".testspace.txt" for list of content
1217
post:
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/${CIRCLE_PROJECT_USERNAME}:${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}#circle.Build.${CIRCLE_BUILD_NUM}
18+
- testspace @.testspace.txt

readme.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
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/Jasmine sample for demonstrating Testspace based on the [javascript-algorithms repo](https://github.com/mgechev/javascript-algorithms)
66

77
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/).
88

9+
* Using a Testspace Project that is `connected` with this GitHub Repo
10+
* Using 3 Online CI services for demonstration purposes only
11+
* Can review the Results at [testspace-samples:javascript.jasmine](https://samples.testspace.com/projects/testspace-samples:javascript.jasmine)
12+
* Refer to our [Getting Started](https://help.testspace.com/getting-started) help articles for more information
13+
14+
***
15+
16+
Using Multiple Online CI Services:
17+
18+
[![Build Status](https://travis-ci.org/testspace-samples/javascript.jasmine.svg?branch=master)](https://travis-ci.org/testspace-samples/javascript.jasmine)
19+
[![CircleCI](https://circleci.com/gh/testspace-samples/javascript.jasmine.svg?style=svg)](https://circleci.com/gh/testspace-samples/javascript.jasmine)
20+
[![Run Status](https://api.shippable.com/projects/5707eeda2a8192902e1bd7b4/badge?branch=master)](https://app.shippable.com/github/testspace-samples/javascript.jasmine)
21+
922
***
1023
Publishing **Test Content** using www.testspace.com.
1124

12-
[![Space Health](https://samples.testspace.com/spaces/804/badge)](https://samples.testspace.com/spaces/804 "Test Cases")
13-
[![Space Metric](https://samples.testspace.com/spaces/804/metrics/755/badge)](https://samples.testspace.com/spaces/804/schema/Code%20Coverage "Code Coverage (branches)")
14-
[![Space Metric](https://samples.testspace.com/spaces/804/metrics/756/badge)](https://samples.testspace.com/spaces/804/schema/Code%20Coverage "Code Coverage (methods)")
15-
[![Space Metric](https://samples.testspace.com/spaces/804/metrics/758/badge)](https://samples.testspace.com/spaces/804/schema/Static%20Analysis "Static Analysis (issues)")
25+
[![Space Health](https://samples.testspace.com/spaces/804/badge?token=92bafa7b581dddbf949ba27529b021e97c8c202e)](https://samples.testspace.com/spaces/804 "Test Cases")
26+
[![Space Metric](https://samples.testspace.com/spaces/804/metrics/757/badge?token=f071330ee6ad6f79e06fd559da954dd39d118840)](https://samples.testspace.com/spaces/804/schema/Code%20Coverage "Code Coverage (statements)")
27+
[![Space Metric](https://samples.testspace.com/spaces/804/metrics/758/badge?token=594794eb54ea687bee71f446d377465366fbf4b4)](https://samples.testspace.com/spaces/804/schema/Static%20Analysis "Static Analysis (issues)")
28+
1629

1730
***
1831

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

2142
<pre>
@@ -24,21 +45,9 @@ npm install
2445
gulp build
2546
</pre>
2647

27-
Push Content using **Testspace client**:
48+
Push Content using Testspace client
2849

2950
<pre>
30-
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
31-
testspace @.testspace.txt $TESTSPACE_TOKEN/$GITHUB_ORG:$REPO_NAME/$BRANCH_NAME#$BUILD_NUMBER
51+
testspace @.testspace.txt
3252
</pre>
3353

34-
Checkout the published [Test Content](https://samples.testspace.com/projects/testspace-samples:python.unittest). 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.
35-
36-
***
37-
38-
To replicate this sample:
39-
- Setup account at www.testspace.com.
40-
- Create a Environment variable called `TESTSPACE_TOKEN`
41-
- `TESTSPACE_TOKEN` = `[email protected]`
42-
- `credentials` set to `username:password` or your [access token](http://help.testspace.com/reference:client-reference#login-credentials)
43-
- 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
44-

shippable.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@ language: node_js
33
node_js:
44
- "4.0"
55

6-
env:
7-
global:
8-
- secure: hG019jypQeIigMnNCKU3LZ7+lfMV5xzKMadSLDYjAerUFfiNizFIMU37r4+1hOqhB5coqnUe39ljfvRnZ6hvKysOBOrJMOWgdrxzNdT9c1g9rgPfkrBq3BHDp2eh5wSN5rFQwEU+83mcgKHLDwo0xnw9D98UFaNNr/00tHt3zA3Kk0FjSf4Zcv9JVE9LxG6Hr/05jHWd7N/41pxdnIQ59fPN1LbCkQsBcVizw6o2MuLy0Jqprv1SniH1Kj4FGsNG8lNTYvVAA2hLcFJ31iYzFFmrFtaqu1hYDgW8mNQMMFr59NGWeeA1BXuDNUZHPRSYK/FioBj+RuYGq0kupGT1UA==
9-
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
1211
- npm install -g gulp
1312
- npm install
1413
- gulp build
1514

16-
# Requires TESTSPACE_TOKEN environment variable.
15+
# refer to ".testspace.txt" for list of content
1716
on_success:
18-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
19-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}
17+
- testspace @.testspace.txt
2018

2119
on_failure:
22-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
23-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}
20+
- testspace @.testspace.txt

0 commit comments

Comments
 (0)