Skip to content

Add newline at end of file #212

Add newline at end of file

Add newline at end of file #212

Workflow file for this run

name: "ci"
on:
pull_request:
branches:
- "main"
workflow_dispatch:
jobs:
Spec:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
secrets: "inherit"
Integration:
needs: "Spec"
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix: {'platform':['centos-7'],'collection':['puppet7-nightly', 'puppet8-nightly']}
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
bundler-cache: true
- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: Create the fixtures directory
run: |
echo ::group::Create the fixtures directory
bundle exec rake spec_prep
echo ::endgroup::
- name: Provision test environment
run: |
bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::provision_cluster image_type=${{ matrix.platform }}
FILE='spec/fixtures/litmus_inventory.yaml'
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
echo INVENTORY_PATH=$FILE >> $GITHUB_ENV
- name: Puppet server setup
run: |
bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::puppetserver_setup collection='${{ matrix.collection }}' -i ./$INVENTORY_PATH
- name: Install agent
run: |
bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
- name: Install module
run: |
bundle exec rake 'litmus:install_module'
- name: Run integration tests
run: |
bundle exec rake kubernetes:integration
- name: Remove test environment
if: ${{ always() }}
continue-on-error: true
run: |
bundle exec rake 'litmus:tear_down'