fix(trading): fix ci cypress issue (#5922)

This commit is contained in:
daro-maj 2024-03-05 17:09:14 +01:00 committed by GitHub
parent b2777043b4
commit c0f4278b81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 43 additions and 38 deletions

View File

@ -11,7 +11,6 @@
"build:all": "nx run-many --all --target=build",
"build-spec:all": "nx run-many --all --target=build-spec",
"lint:all": "nx run-many --all --target=lint",
"e2e:all": "nx run-many --all --target=e2e",
"vegacapsule": "vegacapsule network bootstrap --config-path=../frontend-monorepo/vegacapsule/config.hcl",
"release": "git checkout develop ; git pull ; node scripts/make-release.js",
"trading:test": "cd apps/trading/e2e && poetry run pytest -k",

View File

@ -30,7 +30,8 @@ parser.add_argument('--event-name', help='name of event in CI')
args = parser.parse_args()
# run yarn affected command
affected=check_output(f'yarn nx print-affected --base={environ["NX_BASE"]} --head={environ["NX_HEAD"]} --select=projects'.split()).decode('utf-8')
affected = check_output(
f'yarn nx print-affected --base={environ["NX_BASE"]} --head={environ["NX_HEAD"]} --select=projects'.split()).decode('utf-8')
# print useful information
@ -44,6 +45,8 @@ print(affected)
print(">>>> eof debug")
# define affection actions -> add to projects arrays and generate preview link
def affect_app(app, preview_name=None):
print(f"{app} is affected")
projects.append(app)
@ -51,6 +54,7 @@ def affect_app(app, preview_name=None):
preview_name = app
previews[app] = f'https://{preview_name}.{args.branch_slug}.vega.rocks'
# check appearance in the affected string for main apps
for app in main_apps:
if app in affected:
@ -64,6 +68,10 @@ if not projects:
# generate e2e targets
projects_e2e = [f'{app}-e2e' for app in projects]
# remove trading-e2e because it doesn't exists any more (new target is: console-e2e)
if "trading-e2e" in projects_e2e:
projects_e2e.remove("trading-e2e")
# check affection for multisig-signer which is deployed only from develop and pull requests
if args.event_name == 'pull_request' or 'develop' in args.github_ref:
if 'multisig-signer' in affected:
@ -85,8 +93,6 @@ if 'release' in args.github_ref:
projects = json.dumps(projects)
# The trading project does not use the deafult NX e2e setup (cypress)
projects_e2e.remove('trading-e2e')
projects_e2e = json.dumps(projects_e2e)
print(f'Projects: {projects}')