Repository transferred to Ericsson org #102
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: pull_request | |
concurrency: | |
group: ${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
setup_matrix: | |
name: Setup Test Matrix | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 40 | |
outputs: | |
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} | |
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7.3' | |
bundler-cache: true | |
- name: Run static validations | |
run: bundle exec rake validate lint | |
- name: Run rake rubocop | |
run: bundle exec rake rubocop | |
- name: Setup Test Matrix | |
id: get-outputs | |
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false | |
unit: | |
needs: setup_matrix | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 40 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}} | |
name: Spec Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }}) | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run tests | |
run: bundle exec rake parallel_spec | |
acceptance: | |
name: Litmus Acceptance | |
runs-on: ubuntu-20.04 | |
env: | |
BOLT_GEM: true | |
CI: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7.3' | |
bundler-cache: true | |
- name: Provision Testing Environments | |
run: | | |
bundle exec rake 'litmus:provision_list[default]' | |
bundle exec rake 'litmus:install_agent' | |
bundle exec rake 'litmus:install_module' | |
- name: Run Tests | |
run: bundle exec rake 'litmus:acceptance:parallel' | |
- name: Tear Down | |
run: bundle exec rake 'litmus:tear_down' | |
tests: | |
needs: | |
- unit | |
- acceptance | |
runs-on: ubuntu-20.04 | |
name: Test suite | |
steps: | |
- run: echo Test suite completed |