Skip to content

Commit 34344ee

Browse files
Move nightly verdaccio tests to a separate cloudbuild file (#7584)
1 parent 6a002b7 commit 34344ee

3 files changed

+35
-47
lines changed

cloudbuild-verdaccio.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
steps:
2+
# Install top-level deps.
3+
- name: 'gcr.io/learnjs-174218/release'
4+
entrypoint: 'yarn'
5+
id: 'yarn-common'
6+
args: ['install']
7+
8+
# Run verdaccio nightly publishing tests.
9+
- name: 'gcr.io/learnjs-174218/release'
10+
entrypoint: 'bash'
11+
id: 'nightly-verdaccio-test'
12+
env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'RELEASE=true']
13+
secretEnv: ['BROWSERSTACK_KEY']
14+
waitFor: ['yarn-common']
15+
args:
16+
- '-eEuo'
17+
- 'pipefail'
18+
- '-c'
19+
- |-
20+
yarn release-tfjs --dry --guess-version release --use-local-changes --force
21+
cd /tmp/tfjs-release/tfjs/e2e/
22+
bash scripts/release-e2e.sh
23+
24+
secrets:
25+
- kmsKeyName: projects/learnjs-174218/locations/global/keyRings/tfjs/cryptoKeys/enc
26+
secretEnv:
27+
BROWSERSTACK_KEY: CiQAkwyoIW0LcnxymzotLwaH4udVTQFBEN4AEA5CA+a3+yflL2ASPQAD8BdZnGARf78MhH5T9rQqyz9HNODwVjVIj64CTkFlUCGrP1B2HX9LXHWHLmtKutEGTeFFX9XhuBzNExA=
28+
timeout: 7200s
29+
logsBucket: 'gs://tfjs-build-logs'
30+
substitutions:
31+
_NIGHTLY: ''
32+
options:
33+
logStreamingOption: 'STREAM_ON'
34+
machineType: 'N1_HIGHCPU_32'
35+
substitution_option: 'ALLOW_LOOSE'

scripts/cloudbuild_general_config.yml

-23
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,6 @@ steps:
5252
- 'NIGHTLY=$_NIGHTLY'
5353
secretEnv: ['BROWSERSTACK_KEY']
5454

55-
# Run verdaccio nightly publishing tests.
56-
- name: 'gcr.io/learnjs-174218/release'
57-
entrypoint: 'bash'
58-
id: 'nightly-verdaccio-test'
59-
env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'RELEASE=true']
60-
secretEnv: ['BROWSERSTACK_KEY']
61-
# TODO(mattsoulanille): Remove `bazel-tests` from the waitFor list once CI
62-
# can run on remote builds. Right now, running these both at the same time
63-
# causes Bazel tests to terminate abruptly, presumably from OOM killer.
64-
waitFor: ['yarn-common', 'bazel-tests']
65-
nightlyOnly: true
66-
# Verdaccio tests change the yarn registry, so other package tests must wait
67-
# for them to finish before starting.
68-
waitedForByPackages: true
69-
args:
70-
- '-eEuo'
71-
- 'pipefail'
72-
- '-c'
73-
- |-
74-
yarn release-tfjs --dry --guess-version release --use-local-changes --force
75-
cd /tmp/tfjs-release/tfjs/e2e/
76-
bash scripts/release-e2e.sh
77-
7855
# The following step builds the link package, which is a temporary package
7956
# that helps packages that don't build with Bazel load outputs from packages
8057
# that build with Bazel.

scripts/generate_cloudbuild_test.ts

-24
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,4 @@ describe('generateCloudbuild', () => {
4040
/* print */ false);
4141
expect(cloudbuild).toEqual(expectedCloudbuild as CloudbuildYaml);
4242
});
43-
44-
it('filters nightlyOnly steps when running presubmit tests', () => {
45-
const cloudbuild = generateCloudbuild(['e2e'], /* nightly */ false,
46-
/* print */ false);
47-
expect(cloudbuild.steps).not.toContain(jasmine.objectContaining({
48-
id: 'nightly-verdaccio-test',
49-
}));
50-
});
51-
52-
it('includes nightlyOnly steps when running nightly tests', () => {
53-
const cloudbuild = generateCloudbuild(['e2e'], /* nightly */ true,
54-
/* print */ false);
55-
expect(cloudbuild.steps).toContain(jasmine.objectContaining({
56-
id: 'nightly-verdaccio-test',
57-
}));
58-
});
59-
60-
it('removes the nightlyOnly property from the generated steps', () => {
61-
const cloudbuild = generateCloudbuild(['e2e'], /* nightly */ true,
62-
/* print */ false);
63-
for (let step of cloudbuild.steps) {
64-
expect(Object.keys(step)).not.toContain('nightlyOnly');
65-
}
66-
});
6743
});

0 commit comments

Comments
 (0)