Skip to content
Open
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
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,34 @@ 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:
Comment thread
jjohannes marked this conversation as resolved.
setup-testlens: true
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"
Comment thread
jjohannes marked this conversation as resolved.

test-setup-node:
name: Test Setup Node.js Action
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
23 changes: 23 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Comment thread
jjohannes marked this conversation as resolved.
setup-python:
description: 'Whether to setup Python'
required: false
Expand Down Expand Up @@ -275,6 +282,22 @@ 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' }}
uses: testlens-app/setup-testlens@d96a555133c275a00949d2cc77b70fe9a4242ebf # v1.9.2
with:
write-log-files: ${{ inputs.testlens-write-log-files == 'true' }}

Comment thread
jjohannes marked this conversation as resolved.
- name: Set Up NodeJS Parameters
id: setup-node-params
if: ${{ inputs.setup-node == 'true' }}
Expand Down
Loading