Skip to content

Commit 2381db6

Browse files
author
carabasdaniel
authored
Merge pull request puppetlabs#441 from ekohl/run-validations-prior-to-matrix
Run validation steps prior to the matrix build
2 parents 3899cf8 + 46d41a2 commit 2381db6

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

config_defaults.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ common:
8787
script: bundle exec rake beaker
8888
stage: acceptance
8989
includes:
90-
- env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
90+
- env: CHECK="validate lint check rubocop"
9191
stage: static
9292
- env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
9393
rvm: 2.5.7
@@ -114,7 +114,7 @@ appveyor.yml:
114114
use_litmus: false
115115
matrix:
116116
- RUBY_VERSION: 25-x64
117-
CHECK: "syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
117+
CHECK: "validate lint check rubocop"
118118
- PUPPET_GEM_VERSION: ~> 6.0
119119
RUBY_VERSION: 25
120120
CHECK: parallel_spec
@@ -602,12 +602,12 @@ Gemfile:
602602
ruby_versions:
603603
'2.5.7':
604604
checks:
605-
- 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
605+
- 'validate lint check rubocop'
606606
- parallel_spec
607607
puppet_version: '~> 6'
608608
'2.7.2':
609609
checks:
610-
- 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
610+
- 'validate lint check rubocop'
611611
- parallel_spec
612612
puppet_version: '~> 7'
613613
# beaker: true
@@ -645,6 +645,6 @@ spec/spec_helper.rb:
645645
unmanaged: true
646646
.github/workflows/spec.yml:
647647
unmanaged: true
648-
checks: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
648+
checks: 'validate lint check rubocop'
649649
.github/workflows/release.yml:
650650
unmanaged: true

moduleroot/.github/workflows/pr_test.yml.erb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ jobs:
5757
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
5858
echo STEP_START=$(date +%s) >> $GITHUB_ENV
5959

60+
- name: Run validation steps
61+
run: |
62+
bundle exec rake validate
63+
if: ${{ github.repository_owner == '<%= common['owner'] %>' }}
64+
6065
- name: Setup Acceptance Test Matrix
6166
id: get-matrix
6267
run: |

moduleroot/.github/workflows/spec.yml.erb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ jobs:
6161
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
6262
echo STEP_START=$(date +%s) >> $GITHUB_ENV
6363

64+
- name: Run Static & Syntax Tests
65+
if: ${{ github.repository_owner == '<%= common['owner'] %>' }}
66+
run: |
67+
buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake <%= @configs['checks'] %>
68+
6469
- name: Setup Spec Test Matrix
6570
id: get-matrix
6671
run: |
@@ -126,10 +131,6 @@ jobs:
126131
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
127132
echo ::endgroup::
128133

129-
- name: Run Static & Syntax Tests
130-
run: |
131-
buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake <%= @configs['checks'] %>
132-
133134
- name: Run parallel_spec tests
134135
run: |
135136
buildevents cmd $TRACE_ID $STEP_ID 'rake parallel_spec Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake parallel_spec

0 commit comments

Comments
 (0)