This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logic to generate Renovate
postUpgradeTasks
Previously the test matrix was defined in a local variable and only accessible in the `.github/workflows/test.yaml` template. However, we now also need access to the test matrix in the `renovate.json` template, so that we can generate the correct list of `make gen-golden` commands as Renovate post-upgrade tasks. To allow this we move the test matrix configuration to global variable `testMatrix`. During a transitional period, the GitHub actions template will continue to read the test matrix from the file-level variable `matrix`, but will fall back to the global variable `testMatrix` if the file-level variable is missing. All already onboarded components should migrate their test matrix (if any) to global parametr `testMatrix`, to take advantage of having their golden test outputs updated in Renovate PRs.
- Loading branch information
Showing
3 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<%- | ||
@matrix = @configs.key?('matrix') ? @configs['matrix'] : @configs['testMatrix'] | ||
-%> | ||
name: Pull Request | ||
on: | ||
pull_request: | ||
|
@@ -30,11 +33,11 @@ jobs: | |
<%- if @configs['feature_componentCompile'] -%> | ||
test: | ||
runs-on: ubuntu-latest | ||
<%- if !@configs['matrix'].empty? -%> | ||
<%- if [email protected]? -%> | ||
strategy: | ||
matrix: | ||
<%= @configs['matrix']['key'] -%>: | ||
<% @configs['matrix']['entries'].each do |entry| -%> | ||
<%= @matrix['key'] -%>: | ||
<% @matrix['entries'].each do |entry| -%> | ||
- <%= entry %> | ||
<% end -%> | ||
<%- end -%> | ||
|
@@ -64,11 +67,11 @@ jobs: | |
<%- if @configs['feature_goldenTests'] -%> | ||
golden: | ||
runs-on: ubuntu-latest | ||
<%- if !@configs['matrix'].empty? -%> | ||
<%- if !@matrix.empty? -%> | ||
strategy: | ||
matrix: | ||
<%= @configs['matrix']['key'] -%>: | ||
<% @configs['matrix']['entries'].each do |entry| -%> | ||
<%= @matrix['key'] -%>: | ||
<% @matrix['entries'].each do |entry| -%> | ||
- <%= entry %> | ||
<% end -%> | ||
<%- end -%> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters