Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
# Upload xUnit TRX to Gaffer
- name: Upload xUnit TRX to Gaffer
if: always() && github.actor != 'dependabot[bot]'
uses: gaffer-sh/gaffer-uploader@v0.3.0
uses: gaffer-sh/gaffer-uploader@v0.4.0
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
gaffer_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
report_path: dotnet-examples/reports/xunit-results.trx
commit_sha: ${{ github.event.pull_request.head.sha || github.sha }}
branch: ${{ github.ref_name }}
Expand All @@ -60,9 +60,9 @@ jobs:
# Upload NUnit TRX to Gaffer
- name: Upload NUnit TRX to Gaffer
if: always() && github.actor != 'dependabot[bot]'
uses: gaffer-sh/gaffer-uploader@v0.3.0
uses: gaffer-sh/gaffer-uploader@v0.4.0
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
gaffer_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
report_path: dotnet-examples/reports/nunit-results.trx
commit_sha: ${{ github.event.pull_request.head.sha || github.sha }}
branch: ${{ github.ref_name }}
Expand All @@ -72,9 +72,9 @@ jobs:
# Upload MSTest TRX to Gaffer
- name: Upload MSTest TRX to Gaffer
if: always() && github.actor != 'dependabot[bot]'
uses: gaffer-sh/gaffer-uploader@v0.3.0
uses: gaffer-sh/gaffer-uploader@v0.4.0
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
gaffer_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
report_path: dotnet-examples/reports/mstest-results.trx
commit_sha: ${{ github.event.pull_request.head.sha || github.sha }}
branch: ${{ github.ref_name }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
# Skip on Dependabot PRs (no access to secrets)
- name: Upload Jest JSON to Gaffer
if: always() && github.actor != 'dependabot[bot]'
uses: gaffer-sh/gaffer-uploader@v0.3.0
uses: gaffer-sh/gaffer-uploader@v0.4.0
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
gaffer_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
report_path: jest-example/reports/jest-results.json
commit_sha: ${{ github.event.pull_request.head.sha || github.sha }}
branch: ${{ github.head_ref || github.ref_name }}
Expand All @@ -53,9 +53,9 @@ jobs:

- name: Upload Jest HTML to Gaffer
if: always() && github.actor != 'dependabot[bot]'
uses: gaffer-sh/gaffer-uploader@v0.3.0
uses: gaffer-sh/gaffer-uploader@v0.4.0
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
gaffer_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
report_path: jest-example/reports/jest-report.html
commit_sha: ${{ github.event.pull_request.head.sha || github.sha }}
branch: ${{ github.head_ref || github.ref_name }}
Expand All @@ -67,10 +67,10 @@ jobs:
# if: always() && github.actor != 'dependabot[bot]'
# continue-on-error: true
# env:
# GAFFER_API_KEY: ${{ secrets.GAFFER_API_KEY }}
# GAFFER_UPLOAD_TOKEN: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
# run: |
# curl -X POST https://app.gaffer.sh/api/upload \
# -H "X-API-Key: $GAFFER_API_KEY" \
# -H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
# -F "files=@reports/jest-results.json" \
# -F "commit_sha=${{ github.sha }}" \
# -F "branch=${{ github.ref_name }}" \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
# Skip on Dependabot PRs (no access to secrets)
- name: Upload pytest HTML to Gaffer
if: always() && github.actor != 'dependabot[bot]'
uses: gaffer-sh/gaffer-uploader@v0.3.0
uses: gaffer-sh/gaffer-uploader@v0.4.0
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
gaffer_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
report_path: pytest-example/reports/pytest-report.html
commit_sha: ${{ github.event.pull_request.head.sha || github.sha }}
branch: ${{ github.head_ref || github.ref_name }}
Expand All @@ -54,10 +54,10 @@ jobs:
# if: always() && github.actor != 'dependabot[bot]'
# continue-on-error: true
# env:
# GAFFER_API_KEY: ${{ secrets.GAFFER_API_KEY }}
# GAFFER_UPLOAD_TOKEN: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
# run: |
# curl -X POST https://app.gaffer.sh/api/upload \
# -H "X-API-Key: $GAFFER_API_KEY" \
# -H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
# -F "files=@reports/pytest-report.html" \
# -F "commit_sha=${{ github.sha }}" \
# -F "branch=${{ github.ref_name }}" \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ jobs:
# Skip on Dependabot PRs (no access to secrets)
- name: Upload Ruby HTML to Gaffer
if: always() && github.actor != 'dependabot[bot]'
uses: gaffer-sh/gaffer-uploader@v0.3.0
uses: gaffer-sh/gaffer-uploader@v0.4.0
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
gaffer_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
report_path: ruby-example/report.html
commit_sha: ${{ github.event.pull_request.head.sha || github.sha }}
branch: ${{ github.head_ref || github.ref_name }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/vitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
# Skip on Dependabot PRs (no access to secrets)
- name: Upload Vitest JSON to Gaffer
if: always() && github.actor != 'dependabot[bot]'
uses: gaffer-sh/gaffer-uploader@v0.3.0
uses: gaffer-sh/gaffer-uploader@v0.4.0
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
gaffer_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
report_path: vitest-example/reports/vitest-results.json
commit_sha: ${{ github.event.pull_request.head.sha || github.sha }}
branch: ${{ github.head_ref || github.ref_name }}
Expand All @@ -52,10 +52,10 @@ jobs:
# if: always() && github.actor != 'dependabot[bot]'
# continue-on-error: true
# env:
# GAFFER_API_KEY: ${{ secrets.GAFFER_API_KEY }}
# GAFFER_UPLOAD_TOKEN: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
# run: |
# curl -X POST https://app.gaffer.sh/api/upload \
# -H "X-API-Key: $GAFFER_API_KEY" \
# -H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
# -F "files=@reports/vitest-results.json" \
# -F "commit_sha=${{ github.sha }}" \
# -F "branch=${{ github.ref_name }}" \
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Example test projects demonstrating [Gaffer](https://gaffer.sh) integration for various test frameworks.

Parser Check: December 17 2025 - 8:31
Parser Check: December 25 2025 - 1:10PM - Merry Christmas

## Examples

Expand All @@ -20,7 +20,7 @@ Parser Check: December 17 2025 - 8:31
- Node.js 22+ (Jest, Vitest)
- Python 3.9+ (pytest)
- Docker or .NET 8.0 SDK (xUnit, NUnit, MSTest)
- [Gaffer API key](https://app.gaffer.sh)
- [Gaffer Upload Token](https://app.gaffer.sh)

### Running Examples Locally

Expand Down Expand Up @@ -67,9 +67,9 @@ docker run --rm -v "$(pwd):/app" -w /app mcr.microsoft.com/dotnet/sdk:8.0 sh -c

```yaml
- name: Upload to Gaffer
uses: gaffer-sh/gaffer-uploader@v0.3.0
uses: gaffer-sh/gaffer-uploader@v0.4.0
with:
gaffer_api_key: ${{ secrets.GAFFER_API_KEY }}
gaffer_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }}
report_path: reports/test-report.json
commit_sha: ${{ github.sha }}
branch: ${{ github.ref_name }}
Expand All @@ -80,7 +80,7 @@ docker run --rm -v "$(pwd):/app" -w /app mcr.microsoft.com/dotnet/sdk:8.0 sh -c

```bash
curl -X POST https://app.gaffer.sh/api/upload \
-H "X-API-Key: $GAFFER_API_KEY" \
-H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
-F "files=@reports/test-report.json" \
-F "commit_sha=$COMMIT_SHA" \
-F "branch=$BRANCH"
Expand Down Expand Up @@ -128,7 +128,7 @@ gh run download <run-id> -n jest-reports-<sha>
To use these examples with your own Gaffer project:

1. Fork or clone this repository
2. Add `GAFFER_API_KEY` to your repository secrets
2. Add `GAFFER_UPLOAD_TOKEN` to your repository secrets
3. Push to trigger the workflows

## License
Expand Down
8 changes: 4 additions & 4 deletions dotnet-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This directory contains three test projects using different .NET test frameworks

- [Docker](https://www.docker.com/get-started) (recommended)
- OR [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
- [Gaffer API key](https://app.gaffer.sh)
- [Gaffer Upload Token](https://app.gaffer.sh)

## Running Tests with Docker (Recommended)

Expand Down Expand Up @@ -107,17 +107,17 @@ Each test project includes various test types to demonstrate TRX output:
```bash
# Upload xUnit TRX
curl -X POST https://app.gaffer.sh/api/upload \
-H "X-API-Key: $GAFFER_API_KEY" \
-H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
-F "files=@reports/xunit-results.trx"

# Upload NUnit TRX
curl -X POST https://app.gaffer.sh/api/upload \
-H "X-API-Key: $GAFFER_API_KEY" \
-H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
-F "files=@reports/nunit-results.trx"

# Upload MSTest TRX
curl -X POST https://app.gaffer.sh/api/upload \
-H "X-API-Key: $GAFFER_API_KEY" \
-H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
-F "files=@reports/mstest-results.trx"
```

Expand Down
4 changes: 2 additions & 2 deletions jest-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ npm run test:all
```bash
# Upload JSON report
curl -X POST https://app.gaffer.sh/api/upload \
-H "X-API-Key: $GAFFER_API_KEY" \
-H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
-F "files=@reports/jest-results.json"

# Upload HTML report
curl -X POST https://app.gaffer.sh/api/upload \
-H "X-API-Key: $GAFFER_API_KEY" \
-H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
-F "files=@reports/jest-report.html"
```

Expand Down
2 changes: 1 addition & 1 deletion pytest-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pytest --html=reports/pytest-report.html --self-contained-html

```bash
curl -X POST https://app.gaffer.sh/api/upload \
-H "X-API-Key: $GAFFER_API_KEY" \
-H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
-F "files=@reports/pytest-report.html"
```

Expand Down
2 changes: 1 addition & 1 deletion vitest-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ npm run test:json

```bash
curl -X POST https://app.gaffer.sh/api/upload \
-H "X-API-Key: $GAFFER_API_KEY" \
-H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
-F "files=@reports/vitest-results.json"
```

Expand Down
Loading