Skip to content

Commit c91d0de

Browse files
committed
more badges
1 parent 2fb7382 commit c91d0de

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

README.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,59 @@
55

66
Sample demonstrates techniques for using Testspace with PHP code and the [PHPUnit test framework](https://phpunit.de/).
77

8+
***
9+
Using Multiple Online CI Services:
10+
811
[![Build Status](https://travis-ci.org/testspace-samples/php.phpunit.svg?branch=master)](https://travis-ci.org/testspace-samples/php.phpunit)
9-
[![Space Health](https://samples.testspace.com/projects/86/spaces/290/badge)](https://samples.testspace.com/projects/86/spaces/290 "Test Cases")
10-
[![Space Metric](https://samples.testspace.com/projects/86/spaces/290/metrics/185/badge)](https://samples.testspace.com/projects/86/spaces/290/metrics#metric-185 "Line/Statement Coverage")
12+
[![CircleCI](https://circleci.com/gh/testspace-samples/php.phpunit.svg?style=svg)](https://circleci.com/gh/testspace-samples/php.phpunit)
13+
[![Run Status](https://api.shippable.com/projects/57029e282a8192902e1b8d56/badge?branch=master)](https://app.shippable.com/projects/57029e282a8192902e1b8d56)
14+
15+
***
16+
Publishing **Test Content** using www.testspace.com.
17+
18+
[![Space Health](https://samples.testspace.com/projects/119/spaces/441/badge)](https://samples.testspace.com/projects/119/spaces/441 "Test Cases")
19+
[![Space Metric](https://samples.testspace.com/projects/119/spaces/441/metrics/267/badge)](https://samples.testspace.com/spaces/441/schema/Code%20Coverage "Code Coverage (statements)")
20+
[![Space Metric](https://samples.testspace.com/projects/119/spaces/441/metrics/266/badge)](https://samples.testspace.com/spaces/441/schema/Code%20Coverage "Code Coverage (methods)")
21+
[![Space Metric](https://samples.testspace.com/projects/119/spaces/441/metrics/268/badge)](https://samples.testspace.com/spaces/441/schema/Static%20Analysis "Static Analysis (issues)")
1122

1223

1324
***
1425

1526
In order to run this sample you will need a host workstation that supports the PHP.
1627

28+
Installation
29+
<pre>
30+
composer update
31+
</pre>
32+
33+
Running Static Analysis:
34+
35+
<pre>
36+
vendor/bin/phpcs src tests --report-gitblame=analysis-sniffer-blame.txt --report-checkstyle=analysis-sniffer.xml
37+
vendor/bin/phpmd src,tests xml codesize,naming,unusedcode --reportfile analysis-mess.xml
38+
</pre>
39+
40+
Running Tests with Code Coverage
1741
<pre>
18-
composer install
1942
vendor/bin/phpunit tests/unit --log-junit tests-results.xml --coverage-clover coverage.xml
2043
</pre>
2144

22-
Publishing results example:
45+
Publishing Results using **Testspace**: (note, `.testspace` contains files to publish)
2346

2447
<pre>
25-
testspace publish [Tests]tests-results.xml{tests/unit} coverage.xml
48+
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
49+
testspace @.testspace $TESTSPACE_TOKEN/$BRANCH_NAME
2650
</pre>
2751

28-
Checkout the [Space](https://samples.testspace.com/projects/php/spaces/phpunit).
2952

30-
***
53+
Checkout the [Space](https://samples.testspace.com/projects/php/spaces/php.unit).
3154

55+
***
3256

33-
To fork this example using Travis requires:
57+
To replicate this sample:
3458
- Account at www.testspace.com.
35-
- Travis Environment Variable:
36-
- `TESTSPACE_URL` = `credentials:@my-org-name.testspace.com/my-project/my-space`
59+
- CI Environment Variable called **TESTSPACE_TOKEN** required:
60+
- `TESTSPACE_TOKEN` = `[email protected]/my-project`
3761
- `credentials` set to `username:password` or your [access token](http://help.testspace.com/using-your-organization:user-settings).
38-
- `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.
39-
62+
- `my-org-name.testspace.com/my-project` based on your *subdomain* and *project* names. Refer [here](http://help.testspace.com/reference:runner-reference#login-credentials) for more details.
63+

0 commit comments

Comments
 (0)