diff --git a/.github/actions/test-ruby/action.yml b/.github/actions/test-ruby/action.yml index a63e9508..8c2fca40 100644 --- a/.github/actions/test-ruby/action.yml +++ b/.github/actions/test-ruby/action.yml @@ -26,6 +26,10 @@ inputs: required: false description: Reviewdog report default: 'false' + ADDITIONAL_SETUP: + type: string + default: '[]' + description: 'JSON array of additional setup commands' runs: using: "composite" @@ -44,6 +48,17 @@ runs: bundler-cache: true ruby-version: ${{ inputs.RUBY_VERSION }} + - name: Additional Setup + if: inputs.ADDITIONAL_SETUP != '[]' + shell: bash + env: + ADDITIONAL_SETUP: ${{ inputs.ADDITIONAL_SETUP }} + run: | + echo "$ADDITIONAL_SETUP" | jq -r '.[]' | while read -r command; do + echo "Executing additional setup command: $command" + $command + done + - uses: actions/cache@v4 with: path: vendor/bundle diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index ad7c6039..eb15e93d 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -61,6 +61,10 @@ on: RUBY_RAKE_COMMANDS: type: string description: A comma-separated list of rake commands. + ADDITIONAL_SETUP: + type: string + default: '[]' + description: 'JSON array of additional setup commands' ZEITWERK: type: boolean description: Zeitwerk run. @@ -199,6 +203,7 @@ jobs: RUBY_VERSION: ${{ inputs.RUBY_VERSION }} ENV_PATH: ${{ inputs.ENV_PATH }} RUBY_RAKE_COMMANDS: ${{ inputs.RUBY_RAKE_COMMANDS }} + ADDITIONAL_SETUP: ${{ inputs.ADDITIONAL_SETUP }} ZEITWERK: ${{ inputs.ZEITWERK }} BRAKEMAN: ${{ inputs.BRAKEMAN }} RUBOCOP: ${{ inputs.RUBOCOP }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51c0c74f..b4ff3e30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,6 +115,10 @@ on: RUBY_RAKE_COMMANDS: type: string description: A comma-separated list of rake commands. + ADDITIONAL_SETUP: + type: string + default: '[]' + description: 'JSON array of additional setup commands' ZEITWERK: type: boolean description: Zeitwerk run. @@ -229,6 +233,7 @@ jobs: ENV_PATH: ${{ inputs.ENV_PATH }} TEST_CREATE_NETWORK: ${{ inputs.TEST_CREATE_NETWORK }} RUBY_RAKE_COMMANDS: ${{ inputs.RUBY_RAKE_COMMANDS }} + ADDITIONAL_SETUP: ${{ inputs.ADDITIONAL_SETUP }} ZEITWERK: ${{ inputs.ZEITWERK }} BRAKEMAN: ${{ inputs.BRAKEMAN }} RUBOCOP: ${{ inputs.RUBOCOP }}