Skip to content

Commit

Permalink
create in-cloud action for running Meticulous tests in the cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
alexivanov committed Mar 19, 2024
1 parent 9cd0703 commit d5c28d4
Show file tree
Hide file tree
Showing 12 changed files with 267 additions and 51 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ web_modules/

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
Expand Down Expand Up @@ -178,7 +177,8 @@ dist
.LSOverride

# Icon must end with two \r
Icon
Icon


# Thumbnails
._*
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ COPY src src

RUN yarn build

CMD ["/app/dist/index.mjs"]
CMD ["/app/dist/main/main.entrypoint.js"]
2 changes: 2 additions & 0 deletions out/in-cloud.entrypoint.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 19 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
"description": "Run Meticulous tests",
"license": "Unliscensed",
"private": true,
"type": "module",
"source": "src/index.ts",
"main": "dist/index.mjs",
"types": "dist/index.d.ts",
"targets": {
"main": {
"source": "src/main.entrypoint.ts",
"distDir": "dist"
},
"in-cloud": {
"source": "src/in-cloud.entrypoint.ts",
"distDir": "out"
}
},
"files": [
"dist"
"dist",
"out"
],
"scripts": {
"clean": "rimraf dist tsconfig.tsbuildinfo",
Expand All @@ -25,20 +32,21 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@alwaysmeticulous/client": "^2.97.0",
"@alwaysmeticulous/common": "^2.97.0",
"@alwaysmeticulous/client": "^2.118.0",
"@alwaysmeticulous/common": "^2.118.0",
"@alwaysmeticulous/remote-replay-launcher": "^2.118.0",
"//": "Upgrading `replay-orchestrator-launcher`? Consider bumping the environment version `LOGICAL_ENVIRONMENT_VERSION` in `constants.ts` if the new version includes visible changes.",
"@alwaysmeticulous/replay-orchestrator-launcher": "^2.100.0",
"@alwaysmeticulous/sentry": "^2.72.0",
"@alwaysmeticulous/sentry": "^2.118.0",
"@sentry/node": "^7.50.0",
"lodash.debounce": "^4.0.8",
"loglevel": "^1.8.1",
"luxon": "^3.4.3",
"retry": "^0.13.1"
},
"devDependencies": {
"@alwaysmeticulous/api": "^2.97.0",
"@alwaysmeticulous/sdk-bundles-api": "^2.97.0",
"@alwaysmeticulous/api": "^2.116.0",
"@alwaysmeticulous/sdk-bundles-api": "^2.116.0",
"@parcel/packager-ts": "^2.8.3",
"@parcel/transformer-typescript-types": "^2.8.3",
"@types/jest": "^27.0.3",
Expand All @@ -60,7 +68,7 @@
"yaml": "^2.4.1"
},
"engines": {
"node": ">= 16"
"node": ">= 20"
},
"repository": {
"type": "git",
Expand Down
26 changes: 26 additions & 0 deletions src/actions/in-cloud/get-inputs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { getInputFromEnv } from "../../utils/get-input-from-env";

export const getInCloudActionInputs = () => {
// The names, required value, and types should match that in action.yml
const apiToken = getInputFromEnv({
name: "api-token",
required: true,
type: "string",
});
const githubToken = getInputFromEnv({
name: "github-token",
required: true,
type: "string",
});
const appUrl = getInputFromEnv({
name: "app-url",
required: true,
type: "string",
});

return {
apiToken,
githubToken,
appUrl,
};
};
Loading

0 comments on commit d5c28d4

Please sign in to comment.