Skip to content

Commit

Permalink
fix(pulumi-aws): put node 22 back in constants
Browse files Browse the repository at this point in the history
  • Loading branch information
brunozoric committed Dec 20, 2024
1 parent 92ee3b9 commit b7d568f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/pullRequestsCommandJest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# and run "github-actions-wac build" (or "ghawac build") to regenerate this file.
# For more information, run "github-actions-wac --help".
name: Pull Requests Command - Jest
"on": issue_comment
'on': issue_comment
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
AWS_REGION: eu-central-1
jobs:
checkComment:
Expand All @@ -21,9 +21,9 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
command: jest
reaction: "true"
reaction: 'true'
reaction-type: eyes
allow-edits: "false"
allow-edits: 'false'
permission-level: write
- name: Create comment
uses: peter-evans/create-or-update-comment@v2
Expand All @@ -35,7 +35,7 @@ jobs:
github.run_id }})). :sparkles:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false
validateWorkflows:
name: Validate workflows
Expand All @@ -51,7 +51,7 @@ jobs:
needs: checkComment
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false
baseBranch:
needs: checkComment
Expand All @@ -72,7 +72,7 @@ jobs:
baseRefName -q .baseRefName)" >> $GITHUB_OUTPUT
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false
constants:
needs: baseBranch
Expand All @@ -97,7 +97,7 @@ jobs:
vars.RANDOM_CACHE_KEY_SUFFIX }}" >> $GITHUB_OUTPUT
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false
build:
name: Build
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
path: ${{ needs.baseBranch.outputs.base-branch }}/.webiny/cached-packages
key: ${{ needs.constants.outputs.run-cache-key }}
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jestTestsNoStorage:
needs:
Expand All @@ -156,7 +156,7 @@ jobs:
}}
runs-on: ${{ matrix.os }}
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false
AWS_REGION: eu-central-1
steps:
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
}}
runs-on: ${{ matrix.os }}
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false
AWS_REGION: eu-central-1
steps:
Expand Down Expand Up @@ -331,7 +331,7 @@ jobs:
}}
runs-on: ${{ matrix.os }}
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false
AWS_REGION: eu-central-1
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}
Expand Down Expand Up @@ -428,7 +428,7 @@ jobs:
}}
runs-on: ${{ matrix.os }}
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false
AWS_REGION: eu-central-1
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_OPEN_SEARCH_DOMAIN_NAME }}
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/wac/pullRequestsCommandJest.wac.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {createWorkflow, NormalJob} from "github-actions-wac";
import { createWorkflow, NormalJob } from "github-actions-wac";
import {
createGlobalBuildCacheSteps,
createInstallBuildSteps,
Expand All @@ -13,28 +13,28 @@ import {
NODE_OPTIONS,
NODE_VERSION
} from "./utils";
import {createJob, createValidateWorkflowsJob} from "./jobs";
import { createJob, createValidateWorkflowsJob } from "./jobs";

// Will print "next" or "dev". Important for caching (via actions/cache).
const DIR_WEBINY_JS = "${{ needs.baseBranch.outputs.base-branch }}";

const installBuildSteps = createInstallBuildSteps({workingDirectory: DIR_WEBINY_JS});
const yarnCacheSteps = createYarnCacheSteps({workingDirectory: DIR_WEBINY_JS});
const globalBuildCacheSteps = createGlobalBuildCacheSteps({workingDirectory: DIR_WEBINY_JS});
const runBuildCacheSteps = createRunBuildCacheSteps({workingDirectory: DIR_WEBINY_JS});
const installBuildSteps = createInstallBuildSteps({ workingDirectory: DIR_WEBINY_JS });
const yarnCacheSteps = createYarnCacheSteps({ workingDirectory: DIR_WEBINY_JS });
const globalBuildCacheSteps = createGlobalBuildCacheSteps({ workingDirectory: DIR_WEBINY_JS });
const runBuildCacheSteps = createRunBuildCacheSteps({ workingDirectory: DIR_WEBINY_JS });

const createCheckoutPrSteps = () =>
[
{
name: "Checkout Pull Request",
"working-directory": DIR_WEBINY_JS,
run: "gh pr checkout ${{ github.event.issue.number }}",
env: {GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"}
env: { GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}" }
}
] as NonNullable<NormalJob["steps"]>;

const createJestTestsJob = (storage: string | null) => {
const env: Record<string, string> = {AWS_REGION};
const env: Record<string, string> = { AWS_REGION };

if (storage) {
if (storage === "ddb-es") {
Expand All @@ -50,7 +50,7 @@ const createJestTestsJob = (storage: string | null) => {
}
}

const packages = listPackagesWithJestTests({storage});
const packages = listPackagesWithJestTests({ storage });

return createJob({
needs: ["constants", "build"],
Expand All @@ -66,14 +66,14 @@ const createJestTestsJob = (storage: string | null) => {
"runs-on": "${{ matrix.os }}",
env,
awsAuth: storage === "ddb-es" || storage === "ddb-os",
checkout: {path: DIR_WEBINY_JS},
checkout: { path: DIR_WEBINY_JS },
steps: [
...yarnCacheSteps,
...runBuildCacheSteps,
...installBuildSteps,
...withCommonParams(
[{name: "Run tests", run: "yarn test ${{ matrix.package.cmd }}"}],
{"working-directory": DIR_WEBINY_JS}
[{ name: "Run tests", run: "yarn test ${{ matrix.package.cmd }}" }],
{ "working-directory": DIR_WEBINY_JS }
)
]
});
Expand Down Expand Up @@ -115,7 +115,7 @@ export const pullRequestsCommandJest = createWorkflow({
}
]
}),
validateWorkflows: createValidateWorkflowsJob({needs: "checkComment"}),
validateWorkflows: createValidateWorkflowsJob({ needs: "checkComment" }),
baseBranch: createJob({
needs: "checkComment",
name: "Get base branch",
Expand All @@ -126,7 +126,7 @@ export const pullRequestsCommandJest = createWorkflow({
{
name: "Get base branch",
id: "base-branch",
env: {GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"},
env: { GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}" },
run: 'echo "base-branch=$(gh pr view ${{ github.event.issue.number }} --json baseRefName -q .baseRefName)" >> $GITHUB_OUTPUT'
}
]
Expand Down Expand Up @@ -155,7 +155,7 @@ export const pullRequestsCommandJest = createWorkflow({
build: createJob({
name: "Build",
needs: ["baseBranch", "constants"],
checkout: {path: DIR_WEBINY_JS},
checkout: { path: DIR_WEBINY_JS },
"runs-on": BUILD_PACKAGES_RUNNER,
steps: [
...createCheckoutPrSteps(),
Expand Down
2 changes: 1 addition & 1 deletion packages/pulumi-aws/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { lambda } from "@pulumi/aws";

export const LAMBDA_RUNTIME = lambda.Runtime.NodeJS20dX;
export const LAMBDA_RUNTIME = lambda.Runtime.NodeJS22dX;

export const DEFAULT_PROD_ENV_NAMES = ["prod", "production"];

0 comments on commit b7d568f

Please sign in to comment.