Skip to content

Commit 1ef50d2

Browse files
committed
(maint) Update github actions
1 parent 4065ce2 commit 1ef50d2

File tree

5 files changed

+52
-97
lines changed

5 files changed

+52
-97
lines changed

.github/workflows/nightly.yml

+22-45
Original file line numberDiff line numberDiff line change
@@ -25,37 +25,33 @@ jobs:
2525

2626
- name: "Honeycomb: Start first step"
2727
run: |
28-
echo STEP_ID=0 >> $GITHUB_ENV
28+
echo STEP_ID=setup-environment >> $GITHUB_ENV
2929
echo STEP_START=$(date +%s) >> $GITHUB_ENV
3030
3131
- name: Checkout Source
3232
uses: actions/checkout@v2
3333
if: ${{ github.repository_owner == 'puppetlabs' }}
3434

3535
- name: Activate Ruby 2.7
36-
uses: actions/setup-ruby@v1
36+
uses: ruby/setup-ruby@v1
3737
if: ${{ github.repository_owner == 'puppetlabs' }}
3838
with:
3939
ruby-version: "2.7"
40+
bundler-cache: true
4041

41-
- name: Cache gems
42-
uses: actions/cache@v2
42+
- name: Print bundle environment
4343
if: ${{ github.repository_owner == 'puppetlabs' }}
44-
with:
45-
path: vendor/gems
46-
key: ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
47-
restore-keys: |
48-
${{ runner.os }}-${{ github.event_name }}-
49-
${{ runner.os }}-
44+
run: |
45+
echo ::group::bundler environment
46+
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
47+
echo ::endgroup::
5048
51-
- name: Install gems
49+
- name: "Honeycomb: Record Setup Environment time"
5250
if: ${{ github.repository_owner == 'puppetlabs' }}
5351
run: |
54-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
55-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config jobs 8' -- bundle config jobs 8
56-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config retry 3' -- bundle config retry 3
57-
buildevents cmd $TRACE_ID $STEP_ID 'bundle install' -- bundle install
58-
buildevents cmd $TRACE_ID $STEP_ID 'bundle clean' -- bundle clean
52+
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
53+
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
54+
echo STEP_START=$(date +%s) >> $GITHUB_ENV
5955
6056
- name: Setup Acceptance Test Matrix
6157
id: get-matrix
@@ -67,7 +63,7 @@ jobs:
6763
echo "::set-output name=matrix::{}"
6864
fi
6965
70-
- name: "Honeycomb: Record setup time"
66+
- name: "Honeycomb: Record Setup Test Matrix time"
7167
if: ${{ always() }}
7268
run: |
7369
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
@@ -106,42 +102,22 @@ jobs:
106102
uses: actions/checkout@v2
107103

108104
- name: Activate Ruby 2.7
109-
uses: actions/setup-ruby@v1
105+
uses: ruby/setup-ruby@v1
110106
with:
111107
ruby-version: "2.7"
108+
bundler-cache: true
112109

113-
- name: Cache gems
114-
uses: actions/cache@v2
115-
with:
116-
path: vendor/gems
117-
key: ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
118-
restore-keys: |
119-
${{ runner.os }}-${{ github.event_name }}-
120-
${{ runner.os }}-
121-
122-
- name: "Honeycomb: Record cache setup time"
123-
if: ${{ always() }}
124-
run: |
125-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Cache retrieval'
126-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
127-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
128-
129-
- name: Bundler Setup
110+
- name: Print bundle environment
130111
run: |
131-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
132-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config jobs 8' -- bundle config jobs 8
133-
buildevents cmd $TRACE_ID $STEP_ID 'bundle config retry 3' -- bundle config retry 3
134-
buildevents cmd $TRACE_ID $STEP_ID 'bundle install' -- bundle install
135-
buildevents cmd $TRACE_ID $STEP_ID 'bundle clean' -- bundle clean
136112
echo ::group::bundler environment
137113
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
138114
echo ::endgroup::
139115
140-
- name: "Honeycomb: Record Bundler Setup time"
116+
- name: "Honeycomb: Record Setup Environment time"
141117
if: ${{ always() }}
142118
run: |
143-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Bundler Setup'
144-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
119+
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120+
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
145121
echo STEP_START=$(date +%s) >> $GITHUB_ENV
146122
147123
- name: Provision test environment
@@ -168,7 +144,7 @@ jobs:
168144
run: |
169145
echo ::group::honeycomb step
170146
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
171-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
147+
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
172148
echo STEP_START=$(date +%s) >> $GITHUB_ENV
173149
echo ::endgroup::
174150
@@ -180,11 +156,12 @@ jobs:
180156
if: ${{ always() }}
181157
run: |
182158
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
183-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-5 >> $GITHUB_ENV
159+
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
184160
echo STEP_START=$(date +%s) >> $GITHUB_ENV
185161
186162
- name: Remove test environment
187163
if: ${{ always() }}
164+
continue-on-error: true
188165
run: |
189166
if [ -f inventory.yaml ]; then
190167
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'

.github/workflows/pr_test.yml

+22-45
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,33 @@ jobs:
2323

2424
- name: "Honeycomb: Start first step"
2525
run: |
26-
echo STEP_ID=0 >> $GITHUB_ENV
26+
echo STEP_ID=setup-environment >> $GITHUB_ENV
2727
echo STEP_START=$(date +%s) >> $GITHUB_ENV
2828
2929
- name: Checkout Source
3030
uses: actions/checkout@v2
3131
if: ${{ github.repository_owner == 'puppetlabs' }}
3232

3333
- name: Activate Ruby 2.7
34-
uses: actions/setup-ruby@v1
34+
uses: ruby/setup-ruby@v1
3535
if: ${{ github.repository_owner == 'puppetlabs' }}
3636
with:
3737
ruby-version: "2.7"
38+
bundler-cache: true
3839

39-
- name: Cache gems
40-
uses: actions/cache@v2
40+
- name: Print bundle environment
4141
if: ${{ github.repository_owner == 'puppetlabs' }}
42-
with:
43-
path: vendor/gems
44-
key: ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
45-
restore-keys: |
46-
${{ runner.os }}-${{ github.event_name }}-
47-
${{ runner.os }}-
42+
run: |
43+
echo ::group::bundler environment
44+
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
45+
echo ::endgroup::
4846
49-
- name: Install gems
47+
- name: "Honeycomb: Record Setup Environment time"
5048
if: ${{ github.repository_owner == 'puppetlabs' }}
5149
run: |
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
50+
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
51+
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
52+
echo STEP_START=$(date +%s) >> $GITHUB_ENV
5753
5854
- name: Setup Acceptance Test Matrix
5955
id: get-matrix
@@ -64,7 +60,7 @@ jobs:
6460
echo "::set-output name=matrix::{}"
6561
fi
6662
67-
- name: "Honeycomb: Record setup time"
63+
- name: "Honeycomb: Record Setup Test Matrix time"
6864
if: ${{ always() }}
6965
run: |
7066
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
@@ -104,42 +100,22 @@ jobs:
104100
uses: actions/checkout@v2
105101

106102
- name: Activate Ruby 2.7
107-
uses: actions/setup-ruby@v1
103+
uses: ruby/setup-ruby@v1
108104
with:
109105
ruby-version: "2.7"
106+
bundler-cache: true
110107

111-
- name: Cache gems
112-
uses: actions/cache@v2
113-
with:
114-
path: vendor/gems
115-
key: ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
116-
restore-keys: |
117-
${{ runner.os }}-${{ github.event_name }}-
118-
${{ runner.os }}-
119-
120-
- name: "Honeycomb: Record cache setup time"
121-
if: ${{ always() }}
122-
run: |
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
126-
127-
- name: Bundler Setup
108+
- name: Print bundle environment
128109
run: |
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
134110
echo ::group::bundler environment
135111
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
136112
echo ::endgroup::
137113
138-
- name: "Honeycomb: Record Bundler Setup time"
114+
- name: "Honeycomb: Record Setup Environment time"
139115
if: ${{ always() }}
140116
run: |
141-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Bundler Setup'
142-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
117+
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
118+
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
143119
echo STEP_START=$(date +%s) >> $GITHUB_ENV
144120
145121
- name: Provision test environment
@@ -166,7 +142,7 @@ jobs:
166142
run: |
167143
echo ::group::honeycomb step
168144
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
169-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
145+
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
170146
echo STEP_START=$(date +%s) >> $GITHUB_ENV
171147
echo ::endgroup::
172148
@@ -178,11 +154,12 @@ jobs:
178154
if: ${{ always() }}
179155
run: |
180156
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
181-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-5 >> $GITHUB_ENV
157+
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
182158
echo STEP_START=$(date +%s) >> $GITHUB_ENV
183159
184160
- name: Remove test environment
185161
if: ${{ always() }}
162+
continue-on-error: true
186163
run: |
187164
if [ -f inventory.yaml ]; then
188165
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'

Gemfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ end
1616
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
1717
minor_version = ruby_version_segments[0..1].join('.')
1818

19-
puppet_version = ENV['PUPPET_GEM_VERSION']
20-
facter_version = ENV['FACTER_GEM_VERSION']
21-
hiera_version = ENV['HIERA_GEM_VERSION']
22-
2319
group :development do
2420
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2521
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
@@ -35,6 +31,10 @@ group :system_tests do
3531
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
3632
end
3733

34+
puppet_version = ENV['PUPPET_GEM_VERSION']
35+
facter_version = ENV['FACTER_GEM_VERSION']
36+
hiera_version = ENV['HIERA_GEM_VERSION']
37+
3838
gems = {}
3939

4040
gems['puppet'] = location_for(puppet_version)

Rakefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# frozen_string_literal: true
22

3+
require 'bundler'
34
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
45
require 'puppetlabs_spec_helper/rake_tasks'
56
require 'puppet-syntax/tasks/puppet-syntax'

metadata.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"version_requirement": ">= 5.5.10 < 8.0.0"
8888
}
8989
],
90-
"pdk-version": "1.18.1",
91-
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
92-
"template-ref": "heads/main-0-gdace7b2"
90+
"pdk-version": "1.19.0.pre (47)",
91+
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
92+
"template-ref": "heads/main-0-g1862b96"
9393
}

0 commit comments

Comments
 (0)