From f77f0643ae594b69b3dd37ba0e3f3e653538c650 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 14 Oct 2024 09:49:13 +0200 Subject: [PATCH] add test for smart_proxy_plugin --- .github/workflows/smart_proxy_plugin.yml | 13 +++++++++++++ .../smart_proxy_plugin_workflow_test.yml | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/smart_proxy_plugin_workflow_test.yml diff --git a/.github/workflows/smart_proxy_plugin.yml b/.github/workflows/smart_proxy_plugin.yml index e088a0d..78e1cc3 100644 --- a/.github/workflows/smart_proxy_plugin.yml +++ b/.github/workflows/smart_proxy_plugin.yml @@ -14,6 +14,14 @@ on: default: 'theforeman/smart-proxy' required: false type: string + plugin_repository: + description: Plugin repository to use + required: false + type: string + plugin_version: + description: Plugin version to use + required: false + type: string jobs: rubies: @@ -21,6 +29,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + repository: ${{ inputs.plugin_repository }} + ref: ${{ inputs.plugin_version }} - name: Verify supported Ruby versions uses: theforeman/gha-matrix-ruby-verifier@v0 with: @@ -33,3 +44,5 @@ jobs: command: bundle exec rake test environment_variables: | SMART_PROXY_BRANCH=${{ inputs.foreman_proxy_version }} + gem_repository: ${{ inputs.plugin_repository }} + gem_version: ${{ inputs.plugin_version }} diff --git a/.github/workflows/smart_proxy_plugin_workflow_test.yml b/.github/workflows/smart_proxy_plugin_workflow_test.yml new file mode 100644 index 0000000..91afbed --- /dev/null +++ b/.github/workflows/smart_proxy_plugin_workflow_test.yml @@ -0,0 +1,19 @@ +--- +name: Test smart_proxy_plugin.yml + +on: + pull_request: + paths: + - '.github/workflows/smart_proxy_plugin.yml' + - '.github/workflows/smart_proxy_plugin_workflow_test.yml' + +concurrency: + group: ${{ github.ref_name }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + test: + name: Ruby + uses: ./.github/workflows/smart_proxy_plugin.yml + with: + plugin_repository: theforeman/smart_proxy_pulp