[PR #1200] [MERGED] fix: processing of strategy.matrix.include #1835

Closed
opened 2026-03-01 21:52:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1200
Author: @ChristopherHX
Created: 6/5/2022
Status: Merged
Merged: 6/20/2022
Merged by: @cplee

Base: masterHead: ChristopherHX-matrix-v2


📝 Commits (10+)

📊 Changes

3 files changed (+102 additions, -1 deletions)

View changed files

📝 pkg/model/workflow.go (+39 -0)
📝 pkg/model/workflow_test.go (+1 -0)
📝 pkg/runner/testdata/evalmatrix/push.yml (+62 -1)

📄 Description

Refactored GetMatrices to more closely match my runner.server project and github actions.

  • include properties are now merged with the matrix cross product, if common keys match with an existing entry
  • include properties not matched against any existing entry are added as an additional matrix instance

Partially fixes #769
fixes #1182
resolves #1223

Known Issues, based on recent research in my related project

  • Matrix Keys are case insensitive, but not in act
  • Object Keys are case insensitive in deepequal, but not in act
  • Scalar values are compared with abstract equal, see expression evaluator
    null == '' == 0
  • prevent empty matrices by always return a default matrix entry if everything is empty

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/1200 **Author:** [@ChristopherHX](https://github.com/ChristopherHX) **Created:** 6/5/2022 **Status:** ✅ Merged **Merged:** 6/20/2022 **Merged by:** [@cplee](https://github.com/cplee) **Base:** `master` ← **Head:** `ChristopherHX-matrix-v2` --- ### 📝 Commits (10+) - [`7c3cf18`](https://github.com/nektos/act/commit/7c3cf18bae0174dd0955c40c349289be6405ed7a) Update workflow.go - [`4f88fee`](https://github.com/nektos/act/commit/4f88fee9fee663aabf0094b231efe7e9bdaaffa2) Update workflow.go - [`39b7625`](https://github.com/nektos/act/commit/39b762538ab43ca5edec9920bec201c8492d4359) Update workflow.go - [`9bc5f80`](https://github.com/nektos/act/commit/9bc5f80bf251dd129b509c1627a06d4846c73572) Update workflow.go - [`7074fb4`](https://github.com/nektos/act/commit/7074fb49c218ab07dfd83dfaa9667a91ad41b85d) Update workflow.go - [`e5532ce`](https://github.com/nektos/act/commit/e5532ce128f32dd4a0f202d75381cb27108ce12e) Update workflow.go - [`39fd8f5`](https://github.com/nektos/act/commit/39fd8f5d8d4d48eb9bf88ab08b59fc4aac209862) Add Tests - [`988b2c7`](https://github.com/nektos/act/commit/988b2c7c52b1d105c1e235aeb2c8db2bc07ad4da) Update workflow.go - [`ae19331`](https://github.com/nektos/act/commit/ae19331fb0acccf47b752c8440bacc56f2589839) Modify Test - [`ce5ae6a`](https://github.com/nektos/act/commit/ce5ae6a7e4d8ad5952a9a7f3fc21ccbbde5333a6) use tabs ### 📊 Changes **3 files changed** (+102 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkg/model/workflow.go` (+39 -0) 📝 `pkg/model/workflow_test.go` (+1 -0) 📝 `pkg/runner/testdata/evalmatrix/push.yml` (+62 -1) </details> ### 📄 Description Refactored GetMatrices to more closely match my runner.server project and github actions. - include properties are now merged with the matrix cross product, if common keys match with an existing entry - include properties not matched against any existing entry are added as an additional matrix instance Partially fixes #769 fixes #1182 resolves #1223 **Known Issues**, based on recent research in my related project - Matrix Keys are case insensitive, but not in act - Object Keys are case insensitive in deepequal, but not in act - Scalar values are compared with abstract equal, see expression evaluator null == '' == 0 - prevent empty matrices by always return a default matrix entry if everything is empty --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:52:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1835
No description provided.