Skip to content

Commit a49dfdd

Browse files
Merge branch 'main' into hivanalejandro-features-bigquery-3
2 parents 5013dfc + 4c03eb2 commit a49dfdd

36 files changed

+843
-358
lines changed

.github/config/nodejs-dev.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
"texttospeech",
218218
"tpu",
219219
"translate",
220+
"vision",
220221
"workflows/invoke-private-endpoint"
221222
]
222223
}

.github/config/nodejs-prod.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
"run/idp-sql", // (untested) Error: Invalid contents in the credentials file
9696
"storagetransfer", // CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
9797
"video-intelligence", // PERMISSION_DENIED: The caller does not have permission
98-
"vision", // REDIS: Error: connect ECONNREFUSED 127.0.0.1:6379
9998
"workflows", // SyntaxError: Cannot use import statement outside a module
10099
"workflows/quickstart" // [ERR_MODULE_NOT_FOUND]: Cannot find package 'ts-node' imported from ...
101100
]

.github/workflows/appengine-analytics.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/appengine-metadata-flexible.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.
File renamed without changes.

.github/workflows/ci-prod.yaml renamed to .github/workflows/custard-ci.yaml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,51 @@ jobs:
6060
cat paths.txt
6161
echo "setups=$(./cloud-samples-tools/bin/custard setup-files .github/config/nodejs-prod.jsonc paths.txt)" >> $GITHUB_OUTPUT
6262
63-
nodejs-lint:
64-
name: lint
63+
lint:
64+
needs: affected
6565
runs-on: ubuntu-latest
6666
timeout-minutes: 5
6767
steps:
68-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
69-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
68+
- name: Checkout
69+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
70+
- name: Setup Node
71+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
7072
with:
7173
node-version: 20
72-
- run: make lint
74+
- run: npm install
75+
- name: Run lint
76+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
77+
with:
78+
script: |
79+
const { execSync } = await import("node:child_process");
80+
81+
const cmd = 'npx gts lint';
82+
const affected = ${{ needs.affected.outputs.nodejs-paths }};
83+
if (affected.length === 0) {
84+
console.log("No packages were affected, nothing to lint.")
85+
}
86+
87+
let failed = [];
88+
for (const path of affected) {
89+
try {
90+
execSync(cmd, {cwd: path});
91+
console.log(`✅ [${path}]: ${cmd}`);
92+
} catch (e) {
93+
failed.push(path)
94+
console.log(`❌ [${path}]: ${cmd} (exit code ${e.status})`);
95+
core.error(e.message);
96+
console.log('--- stdout ---');
97+
console.log(e.stdout.toString("utf8"));
98+
console.log('--- stderr ---');
99+
console.log(e.stderr.toString("utf8"));
100+
}
101+
}
102+
console.log("=== Summary ===")
103+
console.log(` Passed: ${affected.length - failed.length}`)
104+
console.log(` Failed: ${failed.length}`)
105+
if (failed.length > 0) {
106+
core.setFailed(`Failed '${cmd}' on: ${failed.join(', ')}`)
107+
}
73108
74109
region-tags:
75110
name: region tags
@@ -82,8 +117,7 @@ jobs:
82117
node-version: 20
83118
- run: ./.github/workflows/utils/region-tags-tests.sh
84119

85-
nodejs-test:
86-
name: test
120+
test:
87121
needs: affected
88122
runs-on: ubuntu-latest
89123
timeout-minutes: 120 # 2 hours hard limit

.github/workflows/recaptcha-enterprise.yaml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/scheduler.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)