Introduce TRAP caching

This commit is contained in:
Edoardo Pirovano 2022-08-02 17:52:22 +01:00
parent cade2b5621
commit 8f867dcb21
No known key found for this signature in database
GPG key ID: 047556B5D93FFE28
52 changed files with 923 additions and 69 deletions

View file

@ -86,6 +86,7 @@ test("load empty config", async (t) => {
undefined,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -106,6 +107,7 @@ test("load empty config", async (t) => {
undefined,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -151,6 +153,7 @@ test("loading config saves config", async (t) => {
undefined,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -185,6 +188,7 @@ test("load input outside of workspace", async (t) => {
"../input",
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -223,6 +227,7 @@ test("load non-local input with invalid repo syntax", async (t) => {
configFile,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -262,6 +267,7 @@ test("load non-existent input", async (t) => {
configFile,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -350,6 +356,7 @@ test("load non-empty input", async (t) => {
debugArtifactName: "my-artifact",
debugDatabaseName: "my-db",
injectedMlQueries: false,
trapCaches: {},
};
const languages = "javascript";
@ -362,6 +369,7 @@ test("load non-empty input", async (t) => {
configFilePath,
undefined,
false,
false,
"my-artifact",
"my-db",
{ owner: "github", repo: "example " },
@ -428,6 +436,7 @@ test("Default queries are used", async (t) => {
configFilePath,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -502,6 +511,7 @@ test("Queries can be specified in config file", async (t) => {
configFilePath,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -575,6 +585,7 @@ test("Queries from config file can be overridden in workflow file", async (t) =>
configFilePath,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -646,6 +657,7 @@ test("Queries in workflow file can be used in tandem with the 'disable default q
configFilePath,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -708,6 +720,7 @@ test("Multiple queries can be specified in workflow file, no config file require
undefined,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -791,6 +804,7 @@ test("Queries in workflow file can be added to the set of queries without overri
configFilePath,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -868,6 +882,7 @@ test("Invalid queries in workflow file handled correctly", async (t) => {
undefined,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -935,6 +950,7 @@ test("API client used when reading remote config", async (t) => {
configFile,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -964,6 +980,7 @@ test("Remote config handles the case where a directory is provided", async (t) =
repoReference,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -1001,6 +1018,7 @@ test("Invalid format of remote config handled correctly", async (t) => {
repoReference,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -1039,6 +1057,7 @@ test("No detected languages", async (t) => {
undefined,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -1069,6 +1088,7 @@ test("Unknown languages", async (t) => {
undefined,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -1121,6 +1141,7 @@ test("Config specifies packages", async (t) => {
configFile,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -1177,6 +1198,7 @@ test("Config specifies packages for multiple languages", async (t) => {
configFile,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example" },
@ -1244,6 +1266,7 @@ function doInvalidInputTest(
configFile,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },
@ -1766,6 +1789,7 @@ const mlPoweredQueriesMacro = test.macro({
undefined,
undefined,
false,
false,
"",
"",
{ owner: "github", repo: "example " },