Skip to content

Commit

Permalink
(CONT-812) Test setting shell default
Browse files Browse the repository at this point in the history
  • Loading branch information
chelnak committed Apr 13, 2023
1 parent 4b84eab commit 13f0f7a
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
- "3.2"
include:
- ruby-version: '2.7'
puppet_gem_version: '~> 7.0'
puppet_version: '~> 7.0'
- ruby_version: '3.2'
puppet_gem_version: 'https://github.com/puppetlabs/puppet' # puppet8'
puppet_version: 'https://github.com/puppetlabs/puppet' # puppet8'
runs_on:
- "windows-latest"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
uses: "./.github/workflows/custom_acceptance.yml"
secrets: "inherit"
with:
ruby_version: ${{ matrix.ruby_version }}
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/custom_acceptance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This exists so we can force the acceptance tests to run under
# powershell.exe.
#
# For such a small edge case it does not seem sensible adding extra
# complication in to the shared actions at this point.
#
# Hopefully this is only a temporary work-around.
name: "Gem Acceptance"

on:
workflow_call:
inputs:
ruby_version:
description: "The target Ruby version."
required: false
default: "2.7"
type: "string"
puppet_version:
description: "The target Puppet version."
required: false
default: "puppet7-nightly"
type: "string"
rake_task:
description: "The name of the rake task that executes acceptance tests"
required: false
default: "acceptance"
type: "string"
runs_on:
description: "The operating system used for the runner."
required: false
default: "ubuntu-latest"
type: "string"

jobs:
acceptance:
name: "acceptance"
runs-on: ${{ inputs.runs_on }}

env:
PUPPET_GEM_VERSION: ${{ inputs.puppet_version }}

steps:

- name: "checkout"
uses: "actions/checkout@v3"

- name: "export environment"
run: |
echo "PUPPET_GEM_VERSION=${{ inputs.puppet_gem_version }} >> $GITHUB_ENV"
- name: "setup ruby"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: ${{ inputs.ruby_version }}
bundler-cache: true

- name: "bundle environment"
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: "execute acceptance tests"
shell: powershell
run: |
# This generic task to run acceptance tests.
# It should be overridden in the Rakefile.
bundle exec rake ${{ inputs.rake_task }}

0 comments on commit 13f0f7a

Please sign in to comment.