Skip to content

Commit 26fcc21

Browse files
authored
Initial draft for version 1 of setup action (#1)
Review feedback & updates on version 1 of the setup action.
1 parent a302184 commit 26fcc21

File tree

13 files changed

+6414
-3
lines changed

13 files changed

+6414
-3
lines changed

.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
"env": {
3+
"node": true
4+
},
5+
"extends": "eslint:recommended",
6+
"parserOptions": {
7+
"ecmaVersion": 11,
8+
"sourceType": "module"
9+
},
10+
"rules": {
11+
}
12+
};

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Testspace Action
2+
on: [push, pull_request]
3+
4+
jobs:
5+
units:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- run: npm ci
10+
- run: npm run lint
11+
test:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 50
20+
- name: Testspace client install & config
21+
uses: ./
22+
with:
23+
domain: "s2"
24+
- name: Testspace push test content
25+
run: testspace [${{ matrix.os}}]./testcontent/*.xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Contribution Guide
2+
The following is a set of guidelines for contributing to this repository, which is hosted in the [Testspace Organization](https://github.com/testspace-com) on GitHub.
3+
4+
## Purpose of repo
5+
This repo contains a GitHub Action, using for working with GitHub Actions CI/CD pipeline. It's purpose is to simplify setting up the Testspace client used for pushing test content within a Workflow.
6+
7+
## PRs, Issues, and Support
8+
Feel free to clone, modify code and request a PR to this repository. All PRs and issues will be reviewed by the Testspace team.
9+
10+
Contact us at: [email protected].

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Testspace
3+
Copyright (c) 2020 S2 Technologies, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
1-
# setup-testspace
2-
A GitHub Action to install and configure the Testspace client used for publishing test content
1+
2+
![Testspace Action](https://github.com/testspacehq/setup-testspace/workflows/Testspace%20Action/badge.svg)
3+
4+
# Testspace client Setup JavaScript Action
5+
A GitHub Action used to install and configure the Testspace client used for publishing test content to [Testspace.com](https://testspace.com).
6+
7+
## Usage
8+
Setting up the Testspace client:
9+
10+
```yaml
11+
uses: testspace-com/setup-testspace@v1
12+
with:
13+
domain: newco
14+
token: ${{ secrets.TESTSPACE_TOKEN }} # optional, only required for private repos
15+
```
16+
17+
## Input
18+
The Testspace client action requires a `domain` and optionally a token for pushing content.
19+
20+
* [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.
21+
* [Testspace token](https://help.testspace.com/docs/dashboard/admin-user#account) is required when using a `private` repo.
22+
23+
## Example
24+
The following hello world type of example:
25+
26+
```
27+
name: hello
28+
on:
29+
push:
30+
jobs:
31+
build:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: testspace-com/setup-testspace@v1
36+
with:
37+
domain: newco
38+
- name: Push test results
39+
run: |
40+
testspace results.xml
41+
if: always()
42+
```
43+
44+
For more information on pushing Test content refer to the help [Overview on publishing](help.testspace.com/docs/publish/getting-started-overview).
45+
46+
## Contributing
47+
Contributions are encouraged following the [Contribution Guide](CONTRIBUTING.md).
48+
49+
50+
## License
51+
This code is released under the [MIT License](LICENSE).
52+
53+

action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'setup-testspace'
2+
description: 'Action to install and configure the Testspace client'
3+
author: 'S2 Technologies, Inc.'
4+
inputs:
5+
domain:
6+
description: 'Testspace domain name'
7+
required: true
8+
token:
9+
description: 'Testspace access token (required for private repos only)'
10+
required: false
11+
branding:
12+
color: green
13+
icon: terminal
14+
runs:
15+
using: 'node12'
16+
main: 'dist/index.js'

0 commit comments

Comments
 (0)