Skip to content

Commit af22bd0

Browse files
committed
Merge branch 'quentin/onlyRunNightlyJobsOnce' into 'master'
chore(ci): only run nightly tests once See merge request TankerHQ/sdk-js!1043
2 parents c427c2d + 1bf6c45 commit af22bd0

File tree

2 files changed

+5
-27
lines changed

2 files changed

+5
-27
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ check/macos/nightly:
108108
stage: check
109109
extends: .rules/nightly
110110
script:
111-
- poetry run python run-ci.py check --runner macos --nightly
111+
- poetry run python run-ci.py check --runner macos
112112
tags:
113113
- macos
114114
timeout: 3h
@@ -130,7 +130,7 @@ check/linux/nightly:
130130
- .rules/nightly
131131
stage: check
132132
script:
133-
- poetry run python run-ci.py check --runner linux --nightly
133+
- poetry run python run-ci.py check --runner linux
134134
tags: !reference [.tags/linux, tags]
135135

136136
check/test-matcher:

run-ci.py

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,6 @@ def fcn(_: Callable[..., None], path: str, e: Any) -> None:
9898
return fcn
9999

100100

101-
def run_tests_in_browser_ten_times(*, runner: str) -> None:
102-
failures = []
103-
for i in range(1, 11):
104-
print("\n" + "-" * 80 + "\n")
105-
print("Running tests round", i)
106-
print("-" * 80, end="\n\n")
107-
try:
108-
run_tests_in_browser(runner=runner)
109-
except (Exception, SystemExit):
110-
failures.append(i)
111-
112-
if failures:
113-
print("Tests failed")
114-
print("Failed rounds:", repr(failures))
115-
raise TestFailed
116-
117-
118101
def run_tests_in_browser(*, runner: str) -> None:
119102
if runner == "linux":
120103
tankerci.js.npm("run", "karma", "--", "--browsers", "ChromeInDocker")
@@ -165,11 +148,9 @@ def lint() -> None:
165148
tankerci.js.npm("run", "lint:compat:all")
166149

167150

168-
def check(*, runner: str, nightly: bool) -> None:
151+
def check(*, runner: str) -> None:
169152
tankerci.js.npm("install")
170-
if nightly:
171-
run_tests_in_browser_ten_times(runner=runner)
172-
elif runner == "node":
153+
if runner == "node":
173154
run_tests_in_node()
174155
else:
175156
run_tests_in_browser(runner=runner)
@@ -240,7 +221,6 @@ def _main() -> None:
240221
subparsers.add_parser("lint")
241222

242223
check_parser = subparsers.add_parser("check")
243-
check_parser.add_argument("--nightly", action="store_true")
244224
check_parser.add_argument("--runner", required=True)
245225

246226
deploy_parser = subparsers.add_parser("deploy")
@@ -261,9 +241,7 @@ def _main() -> None:
261241

262242
args = parser.parse_args()
263243
if args.command == "check":
264-
runner = args.runner
265-
nightly = args.nightly
266-
check(runner=runner, nightly=nightly)
244+
check(runner=args.runner)
267245
elif args.command == "test-matcher":
268246
test_matcher()
269247
elif args.command == "lint":

0 commit comments

Comments
 (0)