send action ref and tool version in status reports

This commit is contained in:
Robert 2020-11-11 18:22:12 +00:00
parent acacf9bbd5
commit 80b43ca9d3
18 changed files with 88 additions and 54 deletions

View file

@ -230,6 +230,15 @@ test('download codeql bundle cache with pinned different version cached if "late
});
test("parse codeql bundle url version", (t) => {
t.deepEqual(
codeql.getCodeQLURLVersion(
"https://github.com/.../codeql-bundle-20200601/..."
),
"20200601"
);
});
test("convert to semver", (t) => {
const tests = {
"20200601": "0.0.0-20200601",
"20200601.0": "0.0.0-20200601.0",
@ -240,11 +249,9 @@ test("parse codeql bundle url version", (t) => {
};
for (const [version, expectedVersion] of Object.entries(tests)) {
const url = `https://github.com/.../codeql-bundle-${version}/...`;
try {
const parsedVersion = codeql.getCodeQLURLVersion(
url,
const parsedVersion = codeql.convertToSemVer(
version,
getRunnerLogger(true)
);
t.deepEqual(parsedVersion, expectedVersion);