6 HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
7 HONEYCOMB_DATASET: litmus tests
11 name: "Setup Test Matrix"
14 matrix: ${{ steps.get-matrix.outputs.matrix }}
17 - name: "Honeycomb: Start recording"
18 uses: kvrhdn/gha-buildevents@5be4636b81803713c94d7cb7e3a4b85d759df112 # pin@v1.0.2
20 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
21 dataset: ${{ env.HONEYCOMB_DATASET }}
22 job-status: ${{ job.status }}
24 - name: "Honeycomb: Start first step"
26 echo STEP_ID=0 >> $GITHUB_ENV
27 echo STEP_START=$(date +%s) >> $GITHUB_ENV
29 - name: Checkout Source
30 uses: actions/checkout@v2
31 if: ${{ github.repository_owner == 'puppetlabs' }}
33 - name: Activate Ruby 2.7
34 uses: actions/setup-ruby@v1
35 if: ${{ github.repository_owner == 'puppetlabs' }}
40 uses: actions/cache@v2
41 if: ${{ github.repository_owner == 'puppetlabs' }}
44 key: ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
46 ${{ runner.os }}-${{ github.event_name }}-
50 if: ${{ github.repository_owner == 'puppetlabs' }}
52 buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
53 buildevents cmd $TRACE_ID $STEP_ID 'bundle config jobs 8' -- bundle config jobs 8
54 buildevents cmd $TRACE_ID $STEP_ID 'bundle config retry 3' -- bundle config retry 3
55 buildevents cmd $TRACE_ID $STEP_ID 'bundle install' -- bundle install
56 buildevents cmd $TRACE_ID $STEP_ID 'bundle clean' -- bundle clean
58 - name: Setup Acceptance Test Matrix
60 if: ${{ github.repository_owner == 'puppetlabs' }}
62 if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
63 buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata
65 echo "::set-output name=matrix::{}"
68 - name: "Honeycomb: Record setup time"
71 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
80 matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
83 BUILDEVENT_FILE: '../buildevents.txt'
87 echo 'platform=${{ matrix.platform }}' >> $BUILDEVENT_FILE
88 echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
90 - name: "Honeycomb: Start recording"
91 uses: kvrhdn/gha-buildevents@5be4636b81803713c94d7cb7e3a4b85d759df112 # pin@v1.0.2
93 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
94 dataset: ${{ env.HONEYCOMB_DATASET }}
95 job-status: ${{ job.status }}
96 matrix-key: ${{ matrix.platform }}-${{ matrix.collection }}
98 - name: "Honeycomb: start first step"
100 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
101 echo STEP_START=$(date +%s) >> $GITHUB_ENV
103 - name: Checkout Source
104 uses: actions/checkout@v2
106 - name: Activate Ruby 2.7
107 uses: actions/setup-ruby@v1
112 uses: actions/cache@v2
115 key: ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
117 ${{ runner.os }}-${{ github.event_name }}-
120 - name: "Honeycomb: Record cache setup time"
123 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Cache retrieval'
124 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
125 echo STEP_START=$(date +%s) >> $GITHUB_ENV
127 - name: Bundler Setup
129 buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
130 buildevents cmd $TRACE_ID $STEP_ID 'bundle config jobs 8' -- bundle config jobs 8
131 buildevents cmd $TRACE_ID $STEP_ID 'bundle config retry 3' -- bundle config retry 3
132 buildevents cmd $TRACE_ID $STEP_ID 'bundle install' -- bundle install
133 buildevents cmd $TRACE_ID $STEP_ID 'bundle clean' -- bundle clean
134 echo ::group::bundler environment
135 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
138 - name: "Honeycomb: Record Bundler Setup time"
141 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Bundler Setup'
142 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
143 echo STEP_START=$(date +%s) >> $GITHUB_ENV
145 - name: Provision test environment
147 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platform }}' -- bundle exec rake 'litmus:provision[provision::provision_service,${{ matrix.platform }}]'
148 echo ::group::=== REQUEST ===
149 cat request.json || true
152 echo ::group::=== INVENTORY ===
153 sed -e 's/password: .*/password: "[redacted]"/' < inventory.yaml || true
156 - name: Install agent
158 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
160 - name: Install module
162 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
164 - name: "Honeycomb: Record deployment times"
167 echo ::group::honeycomb step
168 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
169 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
170 echo STEP_START=$(date +%s) >> $GITHUB_ENV
173 - name: Run acceptance tests
175 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
177 - name: "Honeycomb: Record acceptance testing times"
180 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
181 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-5 >> $GITHUB_ENV
182 echo STEP_START=$(date +%s) >> $GITHUB_ENV
184 - name: Remove test environment
187 if [ -f inventory.yaml ]; then
188 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
189 echo ::group::=== REQUEST ===
190 cat request.json || true
195 - name: "Honeycomb: Record removal times"
198 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'