https://github.com/gaffer-sh/gaffer-uploader
Gaffer.sh Javascript Action
https://github.com/gaffer-sh/gaffer-uploader
test-reporting testing testing-tools
Last synced: about 1 month ago
JSON representation
Gaffer.sh Javascript Action
- Host: GitHub
- URL: https://github.com/gaffer-sh/gaffer-uploader
- Owner: gaffer-sh
- License: mit
- Created: 2024-04-24T12:15:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-25T18:03:12.000Z (5 months ago)
- Last Synced: 2025-12-28T18:51:22.914Z (5 months ago)
- Topics: test-reporting, testing, testing-tools
- Language: TypeScript
- Homepage: https://gaffer.sh
- Size: 5.35 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Gaffer Uploader GitHub Action
[](https://github.com/super-linter/super-linter)

[](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml)
[](./badges/coverage.svg)
Use this action to upload your test reports to Gaffer.
For more examples, visit the
[Gaffer GitHub Action documentation](https://docs.gaffer.sh/guides/github-action).
## Inputs
| Input | Required | Description |
| ---------------- | -------- | ---------------------------------------------------------- |
| `gaffer_api_key` | Yes | Gaffer API key for your project |
| `report_path` | Yes | Path to the report file or directory to upload |
| `api_endpoint` | No | Custom API endpoint URL (for preview/staging environments) |
| `commit_sha` | No | Git commit SHA to associate with the test run |
| `branch` | No | Git branch to associate with the test run |
| `test_framework` | No | Test framework used (e.g., jest, vitest, pytest) |
| `test_suite` | No | Name of the test suite |
## Usage
### Basic Usage
```yaml
- name: Gaffer Upload
uses: gaffer-sh/gaffer-uploader@v1
if: always()
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
report_path: ./test-results.html
commit_sha: ${{ github.sha }}
branch: ${{ github.ref_name }}
test_framework: jest
test_suite: unit
```
### Usage with Artifacts
```yaml
- name: Download all reports from artifacts
uses: actions/download-artifact@v4
with:
path: all-reports
pattern: all-reports-*
merge-multiple: true
- name: Gaffer Upload
uses: gaffer-sh/gaffer-uploader@v0.3.0
if: always()
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
report_path: ./all-reports
commit_sha: ${{ github.sha }}
branch: ${{ github.ref_name }}
test_framework: jest
test_suite: unit
```
### Custom API Endpoint
For preview or staging environments, use the `api_endpoint` input:
```yaml
- name: Gaffer Upload
uses: gaffer-sh/gaffer-uploader@v0.3.0
if: always()
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
report_path: ./test-results.html
api_endpoint: https://preview.gaffer.sh/api/upload
commit_sha: ${{ github.sha }}
branch: ${{ github.ref_name }}
```
## Usage with Environment Variables
Depending on your GitHub Action trigger, you may need to use different methods
to set the `branch` parameter.
This is the most reliable way to set the `branch` parameter:
```yaml
env:
branch_name: ${{ github.head_ref || github.ref_name }}
```