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: Run Static & Syntax Tests
59 if: ${{ github.repository_owner == 'puppetlabs' }}
61 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
63 - name: Setup Spec Test Matrix
66 if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
67 buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
69 echo "::set-output name=spec_matrix::{}"
72 - name: "Honeycomb: Record Setup Test Matrix time"
75 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
78 name: "Spec Tests (Puppet: ${{matrix.puppet_version}}, Ruby Ver: ${{matrix.ruby_version}})"
81 if: ${{ needs.setup_matrix.outputs.spec_matrix != '{}' }}
86 matrix: ${{fromJson(needs.setup_matrix.outputs.spec_matrix)}}
89 BUILDEVENT_FILE: '../buildevents.txt'
90 PUPPET_GEM_VERSION: ${{ matrix.puppet_version }}
91 FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'
95 echo "SANITIZED_PUPPET_VERSION=$(echo '${{ matrix.puppet_version }}' | sed 's/~> //g')" >> $GITHUB_ENV
98 echo 'puppet_version=${{ env.SANITIZED_PUPPET_VERSION }}' >> $BUILDEVENT_FILE
100 - name: "Honeycomb: Start first step"
102 echo "STEP_ID=${{ env.SANITIZED_PUPPET_VERSION }}-spec" >> $GITHUB_ENV
103 echo STEP_START=$(date +%s) >> $GITHUB_ENV
105 - name: "Honeycomb: Start recording"
106 uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
108 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
109 dataset: ${{ env.HONEYCOMB_DATASET }}
110 job-status: ${{ job.status }}
111 matrix-key: ${{ env.SANITIZED_PUPPET_VERSION }}
113 - name: Checkout Source
114 uses: actions/checkout@v2
116 - name: "Activate Ruby ${{ matrix.ruby_version }}"
117 uses: ruby/setup-ruby@v1
119 ruby-version: ${{matrix.ruby_version}}
122 - name: Print bundle environment
124 echo ::group::bundler environment
125 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
128 - name: Run parallel_spec tests
130 buildevents cmd $TRACE_ID $STEP_ID 'rake parallel_spec Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake parallel_spec