Skip to content

Commit 4c93861

Browse files
committed
explicitly set it
1 parent 38abf29 commit 4c93861

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/demo-run-codeql-unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ⚙️ CodeQL Check Examples
1+
name: ⚙️ CodeQL - Run Unit Tests
22

33
on:
44
push:
@@ -29,7 +29,7 @@ jobs:
2929
- name: Export unit test matrix
3030
id: export-unit-test-matrix
3131
run: |
32-
echo "matrix=$(qlt test run get-matrix --os-version ubuntu-latest)" >> $GITHUB_OUTPUT
32+
qlt test run get-matrix --os-version ubuntu-latest
3333
3434
run-test-suites:
3535
name: Run Unit Tests

src/CodeQLToolkit.Features.Test/Commands/Targets/Actions/GetMatrixCommandTarget.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,16 @@ public override void Run()
5959
};
6060

6161
var json = JsonSerializer.Serialize(data);
62-
Console.WriteLine(json);
62+
63+
var matrixVariable = $"matrix={json}";
64+
65+
string envFile = Environment.GetEnvironmentVariable("GITHUB_OUTPUT");
66+
67+
Log<TestCommandFeature>.G().LogInformation($"Writing matrix output {matrixVariable} to {envFile}");
68+
69+
File.AppendAllText(envFile, matrixVariable );
70+
71+
Log<TestCommandFeature>.G().LogInformation($"Done.");
6372

6473
}
6574
}

0 commit comments

Comments
 (0)