Skip to content

Commit

Permalink
[infra] Add BROWSERS to cache key for all WTR tests (#3549)
Browse files Browse the repository at this point in the history
Our WTR config uses the `BROWSERS` environment variable as a way to specify a subset of browsers to test. E.g. if you just want to test in chromium and firefox, you can do `BROWSERS=chromium,firefox npm test`.

In order to prevent wireit from sharing cached successes across runs with different browsers, we need to tell it about the `BROWSERS` variable, using the `env` feature: https://github.com/google/wireit#indicating-external-environment-variables
  • Loading branch information
aomarks committed Jan 4, 2023
1 parent c77220e commit d1f9d14
Show file tree
Hide file tree
Showing 18 changed files with 147 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .changeset/modern-pans-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
10 changes: 10 additions & 0 deletions packages/labs/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -126,6 +131,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
}
Expand Down
5 changes: 5 additions & 0 deletions packages/labs/gen-wrapper-react/test-output/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
"../../../tests:build"
],
"command": "node ../../../tests/run-web-tests.js \"tests/tests.js\" --config ../../../tests/web-test-runner.config.js",
"env": {
"BROWSERS": {
"external": true
}
},
"output": []
}
}
Expand Down
5 changes: 5 additions & 0 deletions packages/labs/gen-wrapper-vue/test-output/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
],
"files": [],
"command": "node ../../../tests/run-web-tests.js \"tests/**/tests.js\" --config ../../../tests/web-test-runner.config.js",
"env": {
"BROWSERS": {
"external": true
}
},
"output": []
}
}
Expand Down
10 changes: 10 additions & 0 deletions packages/labs/motion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -134,6 +139,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
}
Expand Down
10 changes: 10 additions & 0 deletions packages/labs/observers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -148,6 +153,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
}
Expand Down
10 changes: 10 additions & 0 deletions packages/labs/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@
"../../reactive-element:build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -131,6 +136,11 @@
"build:rollup",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
}
Expand Down
10 changes: 10 additions & 0 deletions packages/labs/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
"build:rollup",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -78,6 +83,11 @@
"build:rollup",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand Down
10 changes: 10 additions & 0 deletions packages/labs/scoped-registry-mixin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -129,6 +134,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
}
Expand Down
10 changes: 10 additions & 0 deletions packages/labs/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [
"web-test-runner.config.js",
"../../tests/web-test-runner.config.js"
Expand All @@ -110,6 +115,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [
"web-test-runner.config.js",
"../../tests/web-test-runner.config.js"
Expand Down
10 changes: 10 additions & 0 deletions packages/labs/task/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -127,6 +132,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
}
Expand Down
5 changes: 5 additions & 0 deletions packages/labs/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
"dependencies": [
"build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [
"web-test-runner.config.js"
],
Expand Down
5 changes: 5 additions & 0 deletions packages/labs/virtualizer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@
"build",
"../../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [
"web-test-runner.config.js"
],
Expand Down
10 changes: 10 additions & 0 deletions packages/lit-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@
"build:ts",
"../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -219,6 +224,11 @@
"build:rollup",
"../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand Down
10 changes: 10 additions & 0 deletions packages/lit-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@
"build:ts",
"../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -428,6 +433,11 @@
"build:version-stability-test",
"../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand Down
10 changes: 10 additions & 0 deletions packages/lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@
"build:ts",
"../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -297,6 +302,11 @@
"build:rollup",
"../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand Down
5 changes: 5 additions & 0 deletions packages/localize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
"build",
"../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [
"web-test-runner.config.js"
],
Expand Down
10 changes: 10 additions & 0 deletions packages/reactive-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@
"build:babel",
"../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand All @@ -284,6 +289,11 @@
"build:babel",
"../tests:build"
],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],
"output": []
},
Expand Down

0 comments on commit d1f9d14

Please sign in to comment.