-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
247 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/bash | ||
|
||
node /app/out/main.post-step.entrypoint.js |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { createClient, getProject } from "@alwaysmeticulous/client"; | ||
import { runPostStep } from "../../common/run-post-step"; | ||
import { getInCloudActionInputs } from "./get-inputs"; | ||
|
||
export const runCloudComputePostStep = async (): Promise<void> => { | ||
const { projectTargets, githubToken } = getInCloudActionInputs(); | ||
|
||
const projectTargetsToRun = projectTargets.filter((target) => !target.skip); | ||
|
||
await Promise.all( | ||
projectTargetsToRun.map(async (target) => { | ||
const client = createClient({ apiToken: target.apiToken }); | ||
|
||
const project = await getProject(client); | ||
|
||
if (!project) { | ||
throw new Error(`Project for target ${target.name} not found.`); | ||
} | ||
|
||
return runPostStep({ | ||
apiToken: target.apiToken, | ||
githubToken, | ||
testSuiteOrProjectId: project.id, | ||
}); | ||
}) | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { runPostStep } from "../../common/run-post-step"; | ||
import { getMainActionInputs } from "./get-inputs"; | ||
|
||
export const runMainActionPostStep = async (): Promise<void> => { | ||
const { apiToken, githubToken, testSuiteId } = getMainActionInputs(); | ||
|
||
return runPostStep({ | ||
apiToken, | ||
githubToken, | ||
testSuiteOrProjectId: testSuiteId, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { warning } from "@actions/core"; | ||
import { runCloudComputePostStep } from "./actions/cloud-compute/post-step"; | ||
|
||
runCloudComputePostStep().catch((error) => { | ||
// We're just emitting telemetry in this post step, so log a warning but don't fail | ||
const message = error instanceof Error ? error.message : `${error}`; | ||
warning(message); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export const DOCS_URL = "https://app.meticulous.ai/docs/github-actions-v2"; | ||
export const METICULIOUS_APP_URL = "https://app.meticulous.ai"; | ||
|
||
export const DOCS_URL = `${METICULIOUS_APP_URL}/docs/github-actions-v2`; | ||
|
||
export const METICULOUS_DEBUGGING_PR_TAG = "[meticulous debug]"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/post-step.entrypoint.ts → src/main.post-step.entrypoint.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters