Skip to content

Version 3.0.0

Version 3.0.0 #45

---
name: "Acceptance Testing"
on:
pull_request:
branches:
- "main"
jobs:
setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Activate Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.3"
bundler-cache: true
- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: Setup Integration Test Matrix
id: get-matrix
run: |
echo "matrix=$(cat test_matrix.json | tr -s '\n' ' ')" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
acceptance:
name: "Acceptance tests (${{matrix.collection.agent_version}})"
needs:
- setup_matrix
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
env:
PUPPET_GEM_VERSION: ${{matrix.collection.gem_version}}
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Activate Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.3"
bundler-cache: true
- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: Create the fixtures directory
run: |
bundle exec rake spec_prep
- name: check vars
run: |
export
- name: Provision test environment
run: |
bundle exec rake 'litmus:provision_list[docker]'
FILE='spec/fixtures/litmus_inventory.yaml'
- name: Install Agents and module
run: |
# bundle exec rake 'litmus:install_agent'
bundle exec rake 'litmus:install_agent[${{ matrix.collection.agent_version }}]'
bundle exec rake litmus:install_module
- name: Run integration tests
run: |
bundle exec rake litmus:acceptance:parallel
- name: Remove test environment
if: ${{ always() }}
continue-on-error: true
run: |
ls -lh ./spec/fixtures/
cat ./spec/fixtures/litmus_inventory.yaml
bundle exec rake 'litmus:tear_down'