From e44ed7dfa74575f759a1c3d6b38ec932fae7a550 Mon Sep 17 00:00:00 2001 From: Nils Balkow-Tychsen Date: Fri, 25 Nov 2022 18:06:16 +0100 Subject: [PATCH] make the docker image configurable --- README.md | 25 +++++++++++++------------ action.yml | 6 ++++++ test.sh | 2 +- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8dfbbe3..b54731b 100644 --- a/README.md +++ b/README.md @@ -35,15 +35,16 @@ Run with firefox and in parallel: Available configurations in with block: -| Name | Default | Description | -| ------------------------ | ------------- | ------------------------------------------------------ | -| allowed_shared_memory | '1g' | How much container can use shared memory | -| browser | 'chrome' | Available options chrome / firefox | -| robot_threads | 1 | Change this > 1 if you want to run tests in parallel | -| pabot_options | '' | These are only used if robot_threads > 1 | -| robot_options | '' | Pass extra settings for robot command | -| screen_color_depth | 24 | Color depth of the virtual screen | -| screen_height | 1080 | Height of the virtual screen | -| screen_width | 1920 | Width of the virtual screen | -| robot_tests_dir | 'robot_tests' | Location of tests inside repository | -| robot_reports_dir | 'reports' | Location of report output from test execution | \ No newline at end of file +| Name | Default | Description | +| ------------------------ | ----------------------------------- | ---------------------------------------------------- | +| allowed_shared_memory | '1g' | How much container can use shared memory | +| browser | 'chrome' | Available options chrome / firefox | +| robot_threads | 1 | Change this > 1 if you want to run tests in parallel | +| pabot_options | '' | These are only used if robot_threads > 1 | +| robot_options | '' | Pass extra settings for robot command | +| screen_color_depth | 24 | Color depth of the virtual screen | +| screen_height | 1080 | Height of the virtual screen | +| screen_width | 1920 | Width of the virtual screen | +| robot_tests_dir | 'robot_tests' | Location of tests inside repository | +| robot_reports_dir | 'reports' | Location of report output from test execution | +| robot_runner_image | 'ppodgorsek/robot-framework:latest' | Docker image which will be used to execute the tests | \ No newline at end of file diff --git a/action.yml b/action.yml index 39c0926..a8d9cf0 100644 --- a/action.yml +++ b/action.yml @@ -41,6 +41,11 @@ inputs: description: 'Where will the report from test be saved' required: true default: 'reports' + robot_runner_image: + description: 'The docker image which will be used to execute the tests' + required: true + default: 'ppodgorsek/robot-framework:latest' + runs: using: 'composite' @@ -58,3 +63,4 @@ runs: SCREEN_WIDTH: ${{ inputs.screen_width }} ROBOT_TESTS_DIR: ${{ inputs.robot_tests_dir }} ROBOT_REPORTS_DIR: ${{ inputs.robot_reports_dir }} + ROBOT_RUNNER_IMAGE: ${{ inputs.robot_runner_image }} diff --git a/test.sh b/test.sh index 4c0fafe..e131b95 100755 --- a/test.sh +++ b/test.sh @@ -11,4 +11,4 @@ docker run --shm-size=$ALLOWED_SHARED_MEMORY \ -v $REPORTS_DIR:/opt/robotframework/reports:Z \ -v $TESTS_DIR:/opt/robotframework/tests:Z \ --user $(id -u):$(id -g) \ - ppodgorsek/robot-framework:latest + $ROBOT_RUNNER_IMAGE