.github/workflows: add webclient workflow

Add workflow to run yarn lint/test/format-check against the web
client on pull requests.

Updates #10261

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy
2023-12-06 12:20:44 -05:00
committed by Sonia Appasamy
parent 4a24db852a
commit cc6729a0bc
6 changed files with 336 additions and 18 deletions

View File

@ -81,16 +81,19 @@ export function setUnraidCsrfToken(token?: string) {
// incrementMetric hits the client metrics local API endpoint to
// increment the given counter metric by one.
export function incrementMetric(metricName: MetricName) {
const postData : MetricsPOSTData[] = [{
Name: metricName,
Type: "counter",
Value: 1
}]
const postData: MetricsPOSTData[] = [
{
Name: metricName,
Type: "counter",
Value: 1,
},
]
apiFetch("/local/v0/upload-client-metrics", "POST", postData)
.catch((error) => {
console.error(error)
})
apiFetch("/local/v0/upload-client-metrics", "POST", postData).catch(
(error) => {
console.error(error)
}
)
}
type MetricsPOSTData = {