mirror of
https://github.com/coder/coder.git
synced 2026-06-05 05:58:20 +00:00
chore: remove meticulous from CI (#14369)
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
# Workflow for serving the webapp locally & running Meticulous tests against it.
|
||||
|
||||
name: Meticulous
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "site/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- "site/**"
|
||||
# Meticulous needs the workflow to be triggered on workflow_dispatch events,
|
||||
# so that Meticulous can run the workflow on the base commit to compare
|
||||
# against if an existing workflow hasn't run.
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
statuses: read
|
||||
|
||||
jobs:
|
||||
meticulous:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Repository"
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Build
|
||||
working-directory: ./site
|
||||
run: pnpm build
|
||||
- name: Serve
|
||||
working-directory: ./site
|
||||
run: |
|
||||
pnpm vite preview &
|
||||
sleep 5
|
||||
- name: Run Meticulous tests
|
||||
uses: alwaysmeticulous/report-diffs-action/cloud-compute@v1
|
||||
with:
|
||||
api-token: ${{ secrets.METICULOUS_API_TOKEN }}
|
||||
app-url: "http://127.0.0.1:4173/"
|
||||
+1
-11
@@ -59,7 +59,7 @@ func CSPHeaders(telemetry bool, websocketHosts func() []string) func(next http.H
|
||||
cspDirectiveConnectSrc: {"'self'"},
|
||||
cspDirectiveChildSrc: {"'self'"},
|
||||
// https://github.com/suren-atoyan/monaco-react/issues/168
|
||||
cspDirectiveScriptSrc: {"'self' "},
|
||||
cspDirectiveScriptSrc: {"'self'"},
|
||||
cspDirectiveStyleSrc: {"'self' 'unsafe-inline'"},
|
||||
// data: is used by monaco editor on FE for Syntax Highlight
|
||||
cspDirectiveFontSrc: {"'self' data:"},
|
||||
@@ -88,11 +88,6 @@ func CSPHeaders(telemetry bool, websocketHosts func() []string) func(next http.H
|
||||
if telemetry {
|
||||
// If telemetry is enabled, we report to coder.com.
|
||||
cspSrcs.Append(cspDirectiveConnectSrc, "https://coder.com")
|
||||
// These are necessary to allow meticulous to collect sampling to
|
||||
// improve our testing. Only remove these if we're no longer using
|
||||
// their services.
|
||||
cspSrcs.Append(cspDirectiveConnectSrc, meticulousConnectSrc...)
|
||||
cspSrcs.Append(cspDirectiveScriptSrc, meticulousScriptSrc...)
|
||||
}
|
||||
|
||||
// This extra connect-src addition is required to support old webkit
|
||||
@@ -136,8 +131,3 @@ func CSPHeaders(telemetry bool, websocketHosts func() []string) func(next http.H
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
meticulousConnectSrc = []string{"https://cognito-identity.us-west-2.amazonaws.com", "https://user-events-v3.s3-accelerate.amazonaws.com", "*.sentry.io"}
|
||||
meticulousScriptSrc = []string{"https://snippet.meticulous.ai", "https://browser.sentry-cdn.com"}
|
||||
)
|
||||
|
||||
+1
-26
@@ -1,4 +1,3 @@
|
||||
import { tryLoadAndStartRecorder } from "@alwaysmeticulous/recorder-loader";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { App } from "./App";
|
||||
|
||||
@@ -15,28 +14,4 @@ if (element === null) {
|
||||
}
|
||||
|
||||
const root = createRoot(element);
|
||||
async function startApp() {
|
||||
// Record all sessions on localhost, staging stacks and preview URLs
|
||||
if (isInternal()) {
|
||||
// Start the Meticulous recorder before you initialise your app.
|
||||
// Note: all errors are caught and logged, so no need to surround with try/catch
|
||||
await tryLoadAndStartRecorder({
|
||||
projectId: "Y4uHy1qs0B660xxUdrkLPkazUMPr6OuTqYEnShaR",
|
||||
isProduction: false,
|
||||
});
|
||||
}
|
||||
|
||||
root.render(<App />);
|
||||
}
|
||||
|
||||
function isInternal() {
|
||||
return (
|
||||
process.env.NODE_ENV === "development" &&
|
||||
(window.location.hostname.indexOf("localhost") > -1 ||
|
||||
window.location.hostname.indexOf("127.0.0.1") > -1)
|
||||
);
|
||||
}
|
||||
|
||||
startApp().catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
root.render(<App />);
|
||||
|
||||
Reference in New Issue
Block a user