From 82e40465eeb1fdd6699a10813fc80d4f3131c25e Mon Sep 17 00:00:00 2001 From: Alex Gandy Date: Thu, 25 Dec 2025 09:37:01 -0500 Subject: [PATCH 1/5] Use upload token --- .github/workflows/dotnet.yml | 6 +++--- .github/workflows/jest.yml | 8 ++++---- .github/workflows/pytest.yml | 6 +++--- .github/workflows/ruby.yml | 2 +- .github/workflows/vitest.yml | 6 +++--- README.md | 6 +++--- dotnet-examples/README.md | 6 +++--- jest-example/README.md | 4 ++-- pytest-example/README.md | 2 +- vitest-example/README.md | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e5d23d9..943f368 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -50,7 +50,7 @@ jobs: if: always() && github.actor != 'dependabot[bot]' uses: gaffer-sh/gaffer-uploader@v0.3.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 }} @@ -62,7 +62,7 @@ jobs: if: always() && github.actor != 'dependabot[bot]' uses: gaffer-sh/gaffer-uploader@v0.3.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 }} @@ -74,7 +74,7 @@ jobs: if: always() && github.actor != 'dependabot[bot]' uses: gaffer-sh/gaffer-uploader@v0.3.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 }} diff --git a/.github/workflows/jest.yml b/.github/workflows/jest.yml index 9ae33be..e69426c 100644 --- a/.github/workflows/jest.yml +++ b/.github/workflows/jest.yml @@ -44,7 +44,7 @@ jobs: if: always() && github.actor != 'dependabot[bot]' uses: gaffer-sh/gaffer-uploader@v0.3.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 }} @@ -55,7 +55,7 @@ jobs: if: always() && github.actor != 'dependabot[bot]' uses: gaffer-sh/gaffer-uploader@v0.3.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 }} @@ -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 }}" \ diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 39e7dd6..dd9eccb 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -42,7 +42,7 @@ jobs: if: always() && github.actor != 'dependabot[bot]' uses: gaffer-sh/gaffer-uploader@v0.3.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 }} @@ -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 }}" \ diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index d240e6f..6733a8c 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -37,7 +37,7 @@ jobs: if: always() && github.actor != 'dependabot[bot]' uses: gaffer-sh/gaffer-uploader@v0.3.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 }} diff --git a/.github/workflows/vitest.yml b/.github/workflows/vitest.yml index d8b4db1..31972e9 100644 --- a/.github/workflows/vitest.yml +++ b/.github/workflows/vitest.yml @@ -40,7 +40,7 @@ jobs: if: always() && github.actor != 'dependabot[bot]' uses: gaffer-sh/gaffer-uploader@v0.3.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 }} @@ -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 }}" \ diff --git a/README.md b/README.md index 163a5c4..972b88a 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ docker run --rm -v "$(pwd):/app" -w /app mcr.microsoft.com/dotnet/sdk:8.0 sh -c - name: Upload to Gaffer uses: gaffer-sh/gaffer-uploader@v0.3.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 }} @@ -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" @@ -128,7 +128,7 @@ gh run download -n jest-reports- 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 diff --git a/dotnet-examples/README.md b/dotnet-examples/README.md index 4905f20..f9b643c 100644 --- a/dotnet-examples/README.md +++ b/dotnet-examples/README.md @@ -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" ``` diff --git a/jest-example/README.md b/jest-example/README.md index 7cec02f..ff17f9c 100644 --- a/jest-example/README.md +++ b/jest-example/README.md @@ -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" ``` diff --git a/pytest-example/README.md b/pytest-example/README.md index 87b0d25..7319cc8 100644 --- a/pytest-example/README.md +++ b/pytest-example/README.md @@ -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" ``` diff --git a/vitest-example/README.md b/vitest-example/README.md index 7a32d98..4fe3b8d 100644 --- a/vitest-example/README.md +++ b/vitest-example/README.md @@ -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" ``` From 1ab127d47b16eba54df1a6ef1a42749b0491bc72 Mon Sep 17 00:00:00 2001 From: Alex Gandy Date: Thu, 25 Dec 2025 09:38:16 -0500 Subject: [PATCH 2/5] Fix docs --- README.md | 2 +- dotnet-examples/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 972b88a..6dd0c47 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/dotnet-examples/README.md b/dotnet-examples/README.md index f9b643c..6b61007 100644 --- a/dotnet-examples/README.md +++ b/dotnet-examples/README.md @@ -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) From 0c788ebac5f9885443dce5f5002ee5e02336a598 Mon Sep 17 00:00:00 2001 From: Alex Gandy Date: Thu, 25 Dec 2025 12:57:59 -0500 Subject: [PATCH 3/5] Use v0.4.0 of gaffer-uploader --- .github/workflows/dotnet.yml | 6 +++--- .github/workflows/jest.yml | 4 ++-- .github/workflows/pytest.yml | 2 +- .github/workflows/ruby.yml | 2 +- .github/workflows/vitest.yml | 2 +- README.md | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 943f368..b4c5c9e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -48,7 +48,7 @@ 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_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }} report_path: dotnet-examples/reports/xunit-results.trx @@ -60,7 +60,7 @@ 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_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }} report_path: dotnet-examples/reports/nunit-results.trx @@ -72,7 +72,7 @@ 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_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }} report_path: dotnet-examples/reports/mstest-results.trx diff --git a/.github/workflows/jest.yml b/.github/workflows/jest.yml index e69426c..2de7c05 100644 --- a/.github/workflows/jest.yml +++ b/.github/workflows/jest.yml @@ -42,7 +42,7 @@ 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_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }} report_path: jest-example/reports/jest-results.json @@ -53,7 +53,7 @@ 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_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }} report_path: jest-example/reports/jest-report.html diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index dd9eccb..eb96f7c 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -40,7 +40,7 @@ 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_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }} report_path: pytest-example/reports/pytest-report.html diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 6733a8c..5b2bb6e 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -35,7 +35,7 @@ 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_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }} report_path: ruby-example/report.html diff --git a/.github/workflows/vitest.yml b/.github/workflows/vitest.yml index 31972e9..2a60de0 100644 --- a/.github/workflows/vitest.yml +++ b/.github/workflows/vitest.yml @@ -38,7 +38,7 @@ 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_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }} report_path: vitest-example/reports/vitest-results.json diff --git a/README.md b/README.md index 6dd0c47..9007e79 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ 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_upload_token: ${{ secrets.GAFFER_UPLOAD_TOKEN }} report_path: reports/test-report.json From e311bec03a63944ef92ba34fae64df28a968cf01 Mon Sep 17 00:00:00 2001 From: Alex Gandy Date: Thu, 25 Dec 2025 13:03:58 -0500 Subject: [PATCH 4/5] Re-run examples with Gaffer Token secret added --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9007e79..f0bb5e5 100644 --- a/README.md +++ b/README.md @@ -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:03PM - Merry Christmas ## Examples From 233bc92f4acffd2e73bfea14e10b64d9f36b57f4 Mon Sep 17 00:00:00 2001 From: Alex Gandy Date: Thu, 25 Dec 2025 13:10:58 -0500 Subject: [PATCH 5/5] Set the variable correctly this time, duh --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0bb5e5..db4ddbe 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Example test projects demonstrating [Gaffer](https://gaffer.sh) integration for various test frameworks. -Parser Check: December 25 2025 - 1:03PM - Merry Christmas +Parser Check: December 25 2025 - 1:10PM - Merry Christmas ## Examples