From 9f4be12238686b8a84b912fa3499345420e6efde Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 30 Jun 2023 17:26:14 +0200 Subject: [PATCH] CI: Make runners configureable Tested in https://github.com/voxpupuli/puppet-nginx/pull/1562 --- moduleroot/.github/workflows/ci.yml.erb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/moduleroot/.github/workflows/ci.yml.erb b/moduleroot/.github/workflows/ci.yml.erb index 2cfd1656..b3c7fc11 100644 --- a/moduleroot/.github/workflows/ci.yml.erb +++ b/moduleroot/.github/workflows/ci.yml.erb @@ -17,9 +17,15 @@ jobs: uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1 with: pidfile_workaround: '<%= @configs['pidfile_workaround'] %>' +<%- if @configs['unit_runs_on'] -%> + unit_runs_on: '<%= @configs['unit_runs_on'] %>' +<%- end -%> +<%- if @configs['acceptance_runs_on'] -%> + acceptance_runs_on: '<%= @configs['acceptance_runs_on'] %>' +<%- end -%> <%- else -%> uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v1 -<%- if @configs.key?('rubocop') || !@configs['additional_packages'].empty? -%> +<%- if @configs.key?('rubocop') || !@configs['additional_packages'].empty? || @configs.key?('unit_runs_on') -%> with: <%- end -%> <%- end -%> @@ -29,3 +35,6 @@ jobs: <%- if @configs.key?('rubocop') -%> rubocop: <%= @configs['rubocop'] %> <%- end -%> +<%- if !Dir[File.join(@metadata[:workdir], 'spec', 'acceptance', '**', '*_spec.rb')].any? && @configs['unit_runs_on'] -%> + unit_runs_on: '<%= @configs['unit_runs_on'] %>' +<%- end -%>