Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with skipping non-existing includes keys #1029

Closed
ziyue-pan opened this issue Mar 9, 2022 · 1 comment
Closed

Problems with skipping non-existing includes keys #1029

ziyue-pan opened this issue Mar 9, 2022 · 1 comment
Labels
kind/bug Something isn't working

Comments

@ziyue-pan
Copy link

#763 Introduced an fix (skip non-existing includes keys and hard fail on non-existing excludes keys), which seems to behave differently with GitHub Actions. GitHub Actions allow non-existing includes keys in matrix product (check this run defined by this configuration)

I reproduced it through debugging with act's source code v0.2.25 and the above configuration file.

System information

  • Operating System: Linux
  • Architecture: x64 (64-bit)
  • Docker version: 20.10.12
  • Docker image used in act: did not actually execute the CI process, just parse the configuration file
  • act version: 0.2.25

Expected behaviour

  conda:
    name: conda
    runs-on: ${{matrix.os}}-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - {os: ubuntu, version: 1.8.16, channel: conda-forge, rust: stable}
          - {os: windows, version: 1.8.17, channel: conda-forge, rust: stable}
          - {os: macos, version: 1.8.18, channel: anaconda, rust: stable}
          - {os: ubuntu, version: 1.8.20, channel: anaconda, rust: beta}
          - {os: ubuntu, version: 1.10.1, channel: anaconda, rust: nightly}
...

GetMatrixes() is expected to return the matrix with multiple sets.

Actual behaviour

GetMatrixes() returns []

image

Workflow and/or repository

https://github.com/aldanor/hdf5-rust/blob/master/.github/workflows/ci.yml

act output

No log is printed. I built act from the source code.

More

One possible workaround for this is to remove the non-existing keys check. Yet my solution may not be sound enough.

@@ -252,12 +252,7 @@ func (j *Job) GetMatrixes() []map[string]interface{} {
 					}
 				case interface{}:
 					v := v.(map[string]interface{})
-					for k := range v {
-						if _, ok := m[k]; ok {
-							includes = append(includes, v)
-							break
-						}
-					}
+					includes = append(includes, v)
 				}
 			}
 			delete(m, "include")
@ziyue-pan ziyue-pan added the kind/bug Something isn't working label Mar 9, 2022
@catthehacker
Copy link
Member

duplicate of #769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants