Skip to content

nightly

nightly #262

Workflow file for this run

name: "nightly"
on:
schedule:
- cron: "42 1 * * *"
workflow_dispatch:
jobs:
Spec:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
secrets: "inherit"
setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-latest
outputs:
acceptance_matrix: ${{ steps.get-matrix.outputs.matrix }}
env:
BUNDLE_WITHOUT: release_prep
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Setup ruby"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: "3.1"
bundler-cache: true
- name: "Bundle environment"
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: Setup Test Matrix
id: get-matrix
run: |
bundle exec matrix_from_metadata_v3 --puppet-exclude 7
acceptance:
name: "Acceptance tests (${{matrix.platforms.label}}, ${{matrix.collection}})"
needs: "setup_matrix"
runs-on: ${{ inputs.runs_on || matrix.platforms.runner }}
timeout-minutes: 180
strategy:
fail-fast: false
matrix: ${{ fromJson( needs.setup_matrix.outputs.acceptance_matrix ) }}
env:
BUNDLE_WITHOUT: release_prep
PUPPET_GEM_VERSION: '~> 8.9'
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Setup ruby"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: "3.1"
bundler-cache: true
- name: "Bundle environment"
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: "Provision environment"
run: |
DOCKER_RUN_OPTS=''
bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }},$DOCKER_RUN_OPTS]"
# Redact password
FILE='spec/fixtures/litmus_inventory.yaml'
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
- name: "Install Puppet agent"
run: |
bundle exec rake 'litmus:install_agent'
- name: "Install module"
run: |
bundle exec rake 'litmus:install_module'
- name: "Run acceptance tests"
run: |
bundle exec rake 'litmus:acceptance:parallel'
- name: "Remove test environment"
if: ${{ always() }}
continue-on-error: true
run: |
if [[ -f spec/fixtures/litmus_inventory.yaml ]]; then
bundle exec rake 'litmus:tear_down'
fi