Skip to content

Commit 25d52b2

Browse files
committed
Add configuration for integration tests
1 parent 11efbe6 commit 25d52b2

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

action.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,24 @@ outputs:
8080
runs:
8181
using: composite
8282
steps:
83+
- name: Set environment variables
84+
shell: bash
85+
run: |
86+
: "${DOWNLOAD_JAR:=true}"
87+
: "${JAR_PATH:=split-tests-java.jar}"
88+
echo "DOWNLOAD_JAR=$DOWNLOAD_JAR" >> $GITHUB_ENV
89+
echo "JAR_PATH=$JAR_PATH" >> $GITHUB_ENV
8390
- name: Install split-tests-java
8491
shell: bash
85-
run: curl -L -o split-tests-java.jar "https://github.com/donnerbart/split-tests-java/releases/latest/download/split-tests-java.jar"
92+
run: |
93+
if [[ "$DOWNLOAD_JAR" == "true" ]]; then
94+
curl -L -o "$JAR_PATH" "https://github.com/donnerbart/split-tests-java/releases/latest/download/split-tests-java.jar"
95+
fi
8696
- name: Split tests
8797
id: split-tests-java
8898
shell: bash
8999
run: |
90-
COMMAND="java -jar split-tests-java.jar --split-index ${{ inputs.split-index }} --split-total ${{ inputs.split-total }} --glob ${{ inputs.glob }}"
100+
COMMAND="java -jar $JAR_PATH --split-index ${{ inputs.split-index }} --split-total ${{ inputs.split-total }} --glob ${{ inputs.glob }}"
91101
if [ -n "${{ inputs.exclude-glob }}" ]; then
92102
COMMAND="$COMMAND --exclude-glob ${{ inputs.exclude-glob }}"
93103
fi

0 commit comments

Comments
 (0)