Skip to content

Hack open function to write files in main thread #4486

Hack open function to write files in main thread

Hack open function to write files in main thread #4486

Triggered via pull request December 11, 2024 13:13
Status Failure
Total duration 16m 34s
Artifacts 1

ci-cd.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

13 errors and 7 warnings
lint: src/PyodideWorker.js#L7
Insert `,`
lint: src/PyodideWorker.js#L32
Insert `,`
lint: src/PyodideWorker.js#L93
Insert `,`
lint: src/PyodideWorker.js#L166
Insert `,`
lint: src/PyodideWorker.js#L175
Insert `,`
lint: src/redux/EditorSlice.js#L23
Insert `,`
test: src/components/Editor/Runners/PythonRunner/PyodideRunner/PyodideWorker.test.js#L110
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected) Expected: StringMatching /pyodide_http.patch_all()/ Received 1: " __old_input__ = input def __patched_input__(prompt=False): if (prompt): print(prompt) return __old_input__() __builtins__.input = __patched_input__ " 2: " import basthon import builtins import os· # Save the original open function _original_open = builtins.open· def _custom_open(filename, mode=\"r\", *args, **kwargs): if \"x\" in mode and os.path.exists(filename): raise FileExistsError(f\"File '{filename}' already exists\") if \"w\" in mode or \"a\" in mode or \"x\" in mode: class CustomFile: def __init__(self, filename): self.filename = filename self.content = \"\"· def write(self, content): self.content += content # print(f\"{self.filename} {self.content}\") basthon.kernel.display_event({ \"display_type\": \"file\", \"filename\": self.filename, \"content\": str({\"filename\": self.filename, \"content\": self.content, \"mode\": mode}) })· def close(self): pass· def __enter__(self): return self· def __exit__(self, exc_type, exc_val, exc_tb): self.close()· return CustomFile(filename) else: return _original_open(filename, mode, *args, **kwargs)· # Override the built-in open function builtins.open = _custom_open " Number of calls: 2 at Object.toHaveBeenCalledWith (/home/runner/work/editor-ui/editor-ui/src/components/Editor/Runners/PythonRunner/PyodideRunner/PyodideWorker.test.js:110:36)
test
Process completed with exit code 1.
test-cypress
Cypress tests: 7 failed
deploy-branch / setup-environment
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
lint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
lint: src/components/Editor/Runners/PythonRunner/PyodideRunner/VisualOutputPane.jsx#L23
React Hook useEffect has a missing dependency: 'showVisuals'. Either include it or remove the dependency array
deploy-branch / build-deploy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
test-cypress
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Deprecation notice: v1, v2, and v3 of the artifact actions
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "cypress-artifacts". Please update your workflow to use v4 of the artifact actions. Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

Artifacts

Produced during runtime
Name Size
cypress-artifacts
2.43 MB