10 HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
11 HONEYCOMB_DATASET: litmus tests
15 name: "Setup Test Matrix"
18 spec_matrix: ${{ steps.get-matrix.outputs.spec_matrix }}
21 - name: "Honeycomb: Start recording"
22 uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
24 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
25 dataset: ${{ env.HONEYCOMB_DATASET }}
26 job-status: ${{ job.status }}
28 - name: "Honeycomb: Start first step"
30 echo STEP_ID=setup-environment >> $GITHUB_ENV
31 echo STEP_START=$(date +%s) >> $GITHUB_ENV
33 - name: Checkout Source
34 uses: actions/checkout@v2
35 if: ${{ github.repository_owner == 'puppetlabs' }}
37 - name: Activate Ruby 2.7
38 uses: ruby/setup-ruby@v1
39 if: ${{ github.repository_owner == 'puppetlabs' }}
44 - name: Print bundle environment
45 if: ${{ github.repository_owner == 'puppetlabs' }}
47 echo ::group::bundler environment
48 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
58 - name: Setup Spec Test Matrix
61 if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
62 buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
64 echo "::set-output name=spec_matrix::{}"
67 - name: "Honeycomb: Record Setup Test Matrix time"
70 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
73 name: "Spec Tests (Puppet: ${{matrix.puppet_version}}, Ruby Ver: ${{matrix.ruby_version}})"
76 if: ${{ needs.setup_matrix.outputs.spec_matrix != '{}' }}
81 matrix: ${{fromJson(needs.setup_matrix.outputs.spec_matrix)}}
84 BUILDEVENT_FILE: '../buildevents.txt'
85 PUPPET_GEM_VERSION: ${{ matrix.puppet_version }}
89 echo "SANITIZED_PUPPET_VERSION=$(echo '${{ matrix.puppet_version }}' | sed 's/~> //g')" >> $GITHUB_ENV
92 echo 'puppet_version=${{ env.SANITIZED_PUPPET_VERSION }}' >> $BUILDEVENT_FILE
94 - name: "Honeycomb: Start first step"
96 echo "STEP_ID=${{ env.SANITIZED_PUPPET_VERSION }}-spec" >> $GITHUB_ENV
97 echo STEP_START=$(date +%s) >> $GITHUB_ENV
99 - name: "Honeycomb: Start recording"
100 uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
102 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
103 dataset: ${{ env.HONEYCOMB_DATASET }}
104 job-status: ${{ job.status }}
105 matrix-key: ${{ env.SANITIZED_PUPPET_VERSION }}
107 - name: Checkout Source
108 uses: actions/checkout@v2
110 - name: "Activate Ruby ${{ matrix.ruby_version }}"
111 uses: ruby/setup-ruby@v1
113 ruby-version: ${{matrix.ruby_version}}
116 - name: Print bundle environment
118 echo ::group::bundler environment
119 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
122 - name: Run Static & Syntax Tests
124 buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
126 - name: Run parallel_spec tests
128 buildevents cmd $TRACE_ID $STEP_ID 'rake parallel_spec Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake parallel_spec