Skip to content

Commit

Permalink
Fix test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
kareefardi committed Apr 16, 2024
1 parent 17dc0e5 commit ecbb5ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 3 additions & 7 deletions .github/scripts/get_tests_matrix_alt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@

def main():
test_set_yaml = ".github/test_set.yaml"
output_matrix = {}
output_matrix = {"tests": []}
test_set_stream = open(test_set_yaml)
data = yaml.load(test_set_stream, Loader=yaml.Loader)
for item in data:
tests = item["tests"]
name = item["name"]
if output_matrix.get(name) is None:
output_matrix[name] = {"test-names": []}
url = item["url"]
output_matrix[name]["url"] = url
for test in tests:
output_matrix[name]["test-names"].append(test)
output_matrix["tests"].append({"name": name, "url": url, "test-names": tests})

print(json.dumps(output_matrix), end="")
print(json.dumps(output_matrix))
test_set_stream.close()


Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ jobs:
name: Run Test (Separate workflow)
uses: ./.github/workflows/run_test.yaml
with:
url: ${{ matrix.url }}
test-names: ${{ matrix.test-names }}
name: ${{ matrix.name }}
url: ${{ matrix.tests.url }}
test-names: ${{ matrix.tests.test-names }}
name: ${{ matrix.tests.name }}

0 comments on commit ecbb5ca

Please sign in to comment.