Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testspace-com/setup-testspace
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.3
Choose a base ref
...
head repository: testspace-com/setup-testspace
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 12 commits
  • 5 files changed
  • 3 contributors

Commits on Jan 15, 2021

  1. Copy the full SHA
    25703f6 View commit details

Commits on May 18, 2021

  1. Remove "fetch-depth"

    munderseth authored May 18, 2021
    Copy the full SHA
    f52f6f9 View commit details

Commits on Jun 19, 2021

  1. Readme content updated (#10)

    Updates to readme
    Reference to hello.publish
    munderseth authored Jun 19, 2021
    Copy the full SHA
    0d3ac8e View commit details

Commits on Jul 1, 2021

  1. Fix help links

    munderseth authored Jul 1, 2021
    Copy the full SHA
    8ab6cd9 View commit details
  2. Updates to Readme content (#11)

    * Update README.md
    munderseth authored Jul 1, 2021
    Copy the full SHA
    136495d View commit details

Commits on Aug 18, 2021

  1. Description update only

    munderseth authored Aug 18, 2021
    Copy the full SHA
    2758a29 View commit details
  2. Description updates

    munderseth authored Aug 18, 2021
    Copy the full SHA
    dc3f0b9 View commit details

Commits on Oct 11, 2021

  1. Copy the full SHA
    519ac1a View commit details

Commits on Oct 23, 2021

  1. Update help links

    munderseth authored Oct 23, 2021
    Copy the full SHA
    1d7fb16 View commit details

Commits on Jan 19, 2023

  1. support 'arm64' architecture (#16)

    * add `config-args` option
    * use `$TESTSPACE_CLIENT_VER` to select specific version
    ivailop authored Jan 19, 2023
    Copy the full SHA
    ee1482f View commit details

Commits on Oct 11, 2023

  1. Update README.md

    Fix documentation links
    munderseth authored Oct 11, 2023
    Copy the full SHA
    b743dd3 View commit details

Commits on Jul 5, 2024

  1. Copy the full SHA
    1aa8e15 View commit details
Showing with 71 additions and 77 deletions.
  1. +11 −6 .github/workflows/ci.yml
  2. +37 −60 README.md
  3. +23 −11 action.yml
  4. BIN docs/images/publish.dashboard.png
  5. BIN docs/images/publish.hello.png
17 changes: 11 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
name: Testspace Action
on: [push, pull_request]

on:
push:
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-12, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
- uses: actions/checkout@v4
- name: Testspace client install & config
uses: ./
with:
97 changes: 37 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,58 @@

![Testspace Action](https://github.com/testspace-com/setup-testspace/workflows/Testspace%20Action/badge.svg)
[![Testspace Action](https://github.com/testspace-com/setup-testspace/actions/workflows/ci.yml/badge.svg)](https://github.com/testspace-com/setup-testspace/actions/workflows/ci.yml)


# Testspace client Setup Action
A GitHub Action is used to install and configure the Testspace client used for publishing test results and reports to [Testspace.com](https://github.com/marketplace/testspace-com).
This [GitHub Action](https://github.com/features/actions) is used to install and configure the Testspace client for publishing test results to [Testspace.com](https://github.com/marketplace/testspace-com).

## Usage
Setting up the Testspace client:
- Supports `JUnit` and other results formats such as `NUnit`, `TRX`, etc.
- Supports `Linux`, `maxOS`, and `Windows`

```yaml
uses: testspace-com/setup-testspace@v1
with:
domain: ${{ github.repository_owner }} # Testspace subdomain defaults to GitHub org
token: ${{ secrets.TESTSPACE_TOKEN }} # optional, only required for private repos
```
[LIVE DASHBOARD](https://demo.testspace.com)

Once the client is setup for a job [test results](https://help.testspace.com/docs/publish/push-data-results#file-content) can be published to the Testspace server:
## Usage
Publish test results, code coverage, and other artifacts with one command. Seamless integration with your CI. Manage all your test status with a single dashboard providing history, metrics, and other types of insights.

```
$ testspace results.xml
```yml
steps:
- uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}
token: ${{ secrets.TESTSPACE_TOKEN }} # optional, only required for private repos
..
- name: Publish Results to Testspace
run: testspace path/to/*.xml
```
## Input
#### Setup
The Testspace client action requires a `domain` and optionally a token for publishing test results.

* [Testspace domain](https://help.testspace.com/docs/dashboard/admin-signup) is the **organizational** name (*subdomain*) used when creating the account along with *.testspace.com*. The *.testspace.com* string is optional.
* [Testspace access token](https://help.testspace.com/docs/dashboard/admin-user#account) is required when using a `private` repo.
* [Testspace domain](https://help.testspace.com/dashboard/admin-signup) is the **organizational** name (*subdomain*) used when creating the account along with *.testspace.com*. The *.testspace.com* string is optional.
* [Testspace access token](https://help.testspace.com/dashboard/admin-user#account) is required when using a `private` repo.

## Examples
A few usage examples:
#### Push
Simple to publish test results, code coverage, custom metrics, etc., all with a single line command using the Testspace client.

```
name: CI
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
- uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}
- name: Publish Results to Testspace
run: |
testspace results.xml
if: always()
```
- Automatically supports a `branch-based` process, forks, and `pull requests`
- Can also publish code coverage, and other artifacts (see [here](https://help.testspace.com/publish/push-data-results#file-content) for details)
- Aggregates results for [jobs](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobs), [matrix](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategy), and even **multiple workflows**

When using a **Matrix** it is recommended to use a `folder` to store the test results specific to each matric entry.
This sample repo - https://github.com/testspace-com/hello.publish - demonstrates support for jobs, matrix, and multiple workflows all executing based on the same commit. All of the published results are aggregated together as a single result set.

```
name: CI
on:
push:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
..
- name: Publish Results to Testspace
run: |
testspace [ ${{ matrix.os }} ]results.xml
```
[CLICK HERE](http://testspace-com.testspace.com/projects/testspace-com:hello.publish/spaces/main) to review the *test results* from the `Hello Publish` sample.

When using the [source directory](https://help.testspace.com/docs/publish/push-data-results#source) to organize your test results in corresponding `folders`.
## Testspace Dashboard
[Testpace.com](https://testspace.com) enables monitoring the status of the software, regardless of the testing method. All the metrics; test results, code coverage, defects, requirements, etc., are collected and analyzed together. Testspace Dashboard provides:

```
$ testspace results.xml{path/to/test-source}
```
* Built-in [metrics/graphs](https://help.testspace.com/dashboard/space-metrics)
* Extensive [Failure Tracking Management](https://help.testspace.com/dashboard/space-failures)
* Automatic [Flaky analysis](https://help.testspace.com/dashboard/space-failures#failure-state)
* [Insights](https://help.testspace.com/dashboard/project-insights) for process improvements

For more information on Publishing test results refer to the help [Overview on publishing](http://help.testspace.com/publish/overview).

![Dashboard](./docs/images/publish.dashboard.png "Dashboard")

For more information on Publishing test results refer to the help [Overview on publishing](http://help.testspace.com/docs/publish/overview).

## Contributing
Contributions are encouraged following the [Contribution Guide](CONTRIBUTING.md).
@@ -83,4 +61,3 @@ Contributions are encouraged following the [Contribution Guide](CONTRIBUTING.md)
## License
This code is released under the [MIT License](LICENSE).


34 changes: 23 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,49 @@
name: 'setup-testspace'
description: 'Action to install and configure the Testspace client'
name: 'Testspace Setup CLI'
description: 'Setup Testspace client to publish CI results from workflow to Dashboard; report flaky tests, metrics, graphs, and analytics'
author: 'S2 Technologies, Inc.'
inputs:
domain:
domain:
description: 'Testspace domain name'
required: true
token:
description: 'Testspace access token (required for private repos only)'
required: false
config-args:
description: 'Custom "config" arguments'
required: false
branding:
color: green
icon: terminal
runs:
using: 'composite'
steps:
steps:
- run: |
if [ `uname -m` != 'x86_64' ]; then echo 'Error: Not supported platform.' && exit 1; fi
base_url=https://testspace-client.s3.amazonaws.com
if [ "$TESTSPACE_CLIENT_VER" ]; then version="-$TESTSPACE_CLIENT_VER"; fi
case `uname -s` in
Linux)
folder=$HOME/bin
mkdir -p $folder
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $folder
arch=`uname -m`
if [ "$arch" != "x86_64" ]; then version="-${arch}${version}"; fi
curl -fsSL ${base_url}/testspace-linux${version}.tgz | tar -zxvf- -C $RUNNER_TEMP
cp -f -p -u $RUNNER_TEMP/testspace $folder
;;
Darwin)
folder=$HOME/bin
mkdir -p $folder
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-darwin.tgz | tar -zxvf- -C $folder
arch=`uname -m`
if [ "$arch" != "x86_64" ]; then version="-${arch}${version}"; fi
curl -fsSL ${base_url}/testspace-darwin${version}.tgz | tar -zxvf- -C $RUNNER_TEMP
rsync -t -u $RUNNER_TEMP/testspace $folder
;;
*) # Windows
folder=$LOCALAPPDATA\Programs\testspace
mkdir -p "$folder"
curl -OsSL https://testspace-client.s3.amazonaws.com/testspace-windows.zip
unzip -q -o testspace-windows.zip -d "$folder"
rm testspace-windows.zip
curl -OsSL ${base_url}/testspace-windows${version}.zip
unzip -q -o testspace-windows${version}.zip -d $RUNNER_TEMP
rm testspace-windows${version}.zip
cp -f -p -u $RUNNER_TEMP/testspace.exe "$folder"
;;
esac
echo "$folder" >> $GITHUB_PATH
@@ -45,6 +56,7 @@ runs:
if [ "$token" ]; then
echo "::add-mask::${{ inputs.token }}"
if [ "${token%%:*}" == "$token" ]; then token="${token}:"; fi
domain="${token}@${domain}"
fi
testspace config url "${token}@${domain}"
testspace config url "${domain}" ${{ inputs.config-args }}
shell: bash
Binary file added docs/images/publish.dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/publish.hello.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.