11 HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
12 HONEYCOMB_DATASET: litmus tests
16 name: "Setup Test Matrix"
19 spec_matrix: ${{ steps.get-matrix.outputs.spec_matrix }}
23 - name: "Honeycomb: Start recording"
24 uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
26 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
27 dataset: ${{ env.HONEYCOMB_DATASET }}
28 job-status: ${{ job.status }}
30 - name: "Honeycomb: Start first step"
32 echo STEP_ID=setup-environment >> $GITHUB_ENV
33 echo STEP_START=$(date +%s) >> $GITHUB_ENV
34 - name: Checkout Source
35 uses: actions/checkout@v2
36 if: ${{ github.repository_owner == 'puppetlabs' }}
38 - name: Activate Ruby 2.7
39 uses: ruby/setup-ruby@v1
40 if: ${{ github.repository_owner == 'puppetlabs' }}
45 - name: Print bundle environment
46 if: ${{ github.repository_owner == 'puppetlabs' }}
48 echo ::group::bundler environment
49 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
51 - name: "Honeycomb: Record Setup Environment time"
52 if: ${{ github.repository_owner == 'puppetlabs' }}
54 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
55 echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
56 echo STEP_START=$(date +%s) >> $GITHUB_ENV
57 - name: Run Static & Syntax Tests
58 if: ${{ github.repository_owner == 'puppetlabs' }}
60 buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
62 - name: Setup Spec Test Matrix
65 if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
66 buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
68 echo "::set-output name=spec_matrix::{}"
70 - name: "Honeycomb: Record Setup Test Matrix time"
73 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
75 name: "Spec Tests (Puppet: ${{matrix.puppet_version}}, Ruby Ver: ${{matrix.ruby_version}})"
78 if: ${{ needs.setup_matrix.outputs.spec_matrix != '{}' }}
83 matrix: ${{fromJson(needs.setup_matrix.outputs.spec_matrix)}}
86 BUILDEVENT_FILE: '../buildevents.txt'
87 PUPPET_GEM_VERSION: ${{ matrix.puppet_version }}
88 FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'
92 echo "SANITIZED_PUPPET_VERSION=$(echo '${{ matrix.puppet_version }}' | sed 's/~> //g')" >> $GITHUB_ENV
95 echo 'puppet_version=${{ env.SANITIZED_PUPPET_VERSION }}' >> $BUILDEVENT_FILE
96 - name: "Honeycomb: Start first step"
98 echo "STEP_ID=${{ env.SANITIZED_PUPPET_VERSION }}-spec" >> $GITHUB_ENV
99 echo STEP_START=$(date +%s) >> $GITHUB_ENV
101 - name: "Honeycomb: Start recording"
102 uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
104 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
105 dataset: ${{ env.HONEYCOMB_DATASET }}
106 job-status: ${{ job.status }}
107 matrix-key: ${{ env.SANITIZED_PUPPET_VERSION }}
108 - name: Checkout Source
109 uses: actions/checkout@v2
111 - name: "Activate Ruby ${{ matrix.ruby_version }}"
112 uses: ruby/setup-ruby@v1
114 ruby-version: ${{matrix.ruby_version}}
117 - name: Print bundle environment
119 echo ::group::bundler environment
120 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
124 - name: Run parallel_spec tests
126 buildevents cmd $TRACE_ID $STEP_ID 'rake parallel_spec Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake parallel_spec