From cb470d938fea682d7b45688176b1a112fb803f8f Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 8 May 2026 08:05:38 +0200 Subject: [PATCH 1/3] feat: add support for setup-testlens action https://github.com/testlens-app/setup-testlens Signed-off-by: Jendrik Johannes --- .github/workflows/test.yml | 26 ++++++++++++++++++++++++++ action.yml | 14 ++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3099784..4f73c25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -202,6 +202,32 @@ jobs: echo "Gradle Dependency Graph File: ${{ steps.test-setup-gradle.outputs.gradle-dependency-graph-file }}" gradle -v + test-setup-testlens: + name: Test Setup TestLens Action + runs-on: ubuntu-latest + steps: + - name: Harden Runner + id: harden-runner + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - name: Checkout Repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Run Setup TestLens Action + uses: ./ + id: test-setup-testlens + env: + GRADLE_USER_HOME: "${{ github.workspace }}/gradle-home" # simulate environment provided by setup-gradle + with: + setup-testlens: true + testlens-write-log-files: false + + - name: Verify TestLens + run: | + cat "$GRADLE_USER_HOME/init.d/testlens-init.gradle" + test-setup-node: name: Test Setup Node.js Action runs-on: ubuntu-latest diff --git a/action.yml b/action.yml index ba6605f..fc6458a 100644 --- a/action.yml +++ b/action.yml @@ -65,6 +65,13 @@ inputs: description: 'When true, entries will not be restored from the cache but will be saved at the end of the Job.' required: false default: 'false' + setup-testlens: + description: 'Whether to setup TestLens' + required: false + testlens-write-log-files: + description: 'Whether to instruct TestLens to write log files about its activity' + required: false + default: 'false' setup-python: description: 'Whether to setup Python' required: false @@ -275,6 +282,13 @@ runs: cache-disabled: ${{ inputs.gradle-cache-disabled == 'true' }} gradle-version: ${{ inputs.gradle-version }} + - name: Setup TestLens + id: setup-testlens + if: ${{ inputs.setup-testlens == 'true' }} + uses: testlens-app/setup-testlens@d96a555133c275a00949d2cc77b70fe9a4242ebf # v1.9.2 + with: + write-log-files: ${{ inputs.testlens-write-log-files == 'true' }} + - name: Set Up NodeJS Parameters id: setup-node-params if: ${{ inputs.setup-node == 'true' }} From 9e68d7bbb4c63867b6062442430f76970db7723b Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 8 May 2026 09:41:58 +0200 Subject: [PATCH 2/3] chore: update readme Signed-off-by: Jendrik Johannes --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 33878a2..1ab9a1e 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,13 @@ Common steps for initializing a job for GitHub actions. This composite action co | gradle-cache-read-only | Whether to use read-only caching for Gradle | No | - | | cache-write-only | When true, entries will not be restored from cache but will be saved at the end of the Job | No | false | +**TestLens** + +| Input | Description | Required | Default | +|--------------------------|--------------------------------------------------------------------|----------|---------| +| setup-testlens | Whether to setup TestLens | No | - | +| testlens-write-log-files | Whether to instruct TestLens to write log files about its activity | No | false | + **Node.js** | Input | Description | Required | Default | From 133352328ef166f345774e0cf361f88e444ac703 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 8 May 2026 09:49:36 +0200 Subject: [PATCH 3/3] feat: add setup log output and fix test Signed-off-by: Jendrik Johannes --- .github/workflows/test.yml | 2 ++ action.yml | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f73c25..247236d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -225,6 +225,8 @@ jobs: testlens-write-log-files: false - name: Verify TestLens + env: + GRADLE_USER_HOME: "${{ github.workspace }}/gradle-home" run: | cat "$GRADLE_USER_HOME/init.d/testlens-init.gradle" diff --git a/action.yml b/action.yml index fc6458a..bdaa704 100644 --- a/action.yml +++ b/action.yml @@ -282,6 +282,15 @@ runs: cache-disabled: ${{ inputs.gradle-cache-disabled == 'true' }} gradle-version: ${{ inputs.gradle-version }} + - name: Set Up TestLens Parameters + id: setup-testlens-params + if: ${{ inputs.setup-testlens == 'true' }} + shell: bash + run: | + echo "::group::Setting up TestLens." + echo "Write Log Files: ${{ inputs.testlens-write-log-files == 'true' }}" + echo "::endgroup::" + - name: Setup TestLens id: setup-testlens if: ${{ inputs.setup-testlens == 'true' }}