{"html_url": "https://github.com/simonw/datasette/issues/1737#issuecomment-1115470180", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1737", "id": 1115470180, "node_id": "IC_kwDOBm6k_c5CfLlk", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-05-02T23:39:29Z", "updated_at": "2022-05-02T23:39:29Z", "author_association": "OWNER", "body": "Test ran in 38 seconds and passed! https://github.com/simonw/datasette/runs/6265954274?check_suite_focus=true\r\n\r\nI'm going to have it run on every commit and PR.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1223459734, "label": "Automated test for Pyodide compatibility"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1737#issuecomment-1115468193", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1737", "id": 1115468193, "node_id": "IC_kwDOBm6k_c5CfLGh", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-05-02T23:35:26Z", "updated_at": "2022-05-02T23:35:26Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/runs/6265915080?check_suite_focus=true failed but looks like it passed because I forgot to use `set -e` at the start of the bash script.\r\n\r\nIt failed because it didn't have `build` available.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1223459734, "label": "Automated test for Pyodide compatibility"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1737#issuecomment-1115464097", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1737", "id": 1115464097, "node_id": "IC_kwDOBm6k_c5CfKGh", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-05-02T23:27:40Z", "updated_at": "2022-05-02T23:27:40Z", "author_association": "OWNER", "body": "I'm going to start off by running this manually - I may run it on every commit once this is all a little bit more stable.\r\n\r\nI can base the workflow on https://github.com/simonw/scrape-hacker-news-by-domain/blob/main/.github/workflows/scrape.yml", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1223459734, "label": "Automated test for Pyodide compatibility"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1737#issuecomment-1115462720", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1737", "id": 1115462720, "node_id": "IC_kwDOBm6k_c5CfJxA", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-05-02T23:25:03Z", "updated_at": "2022-05-02T23:25:03Z", "author_association": "OWNER", "body": "Here's a script that seems to work. It builds the wheel, starts a Python web server that serves the wheel, runs a test with `shot-scraper` and then shuts down the server again.\r\n\r\n```bash\r\n#!/bin/bash\r\n\r\n# Build the wheel\r\npython3 -m build\r\n\r\n# Find name of wheel\r\nwheel=$(basename $(ls dist/*.whl))\r\n# strip off the dist/\r\n\r\n\r\n# Create a blank index page\r\necho '\r\n\r\n' > dist/index.html\r\n\r\n# Run a server for that dist/ folder\r\ncd dist\r\npython3 -m http.server 8529 &\r\ncd ..\r\n\r\nshot-scraper javascript http://localhost:8529/ \"\r\nasync () => {\r\n let pyodide = await loadPyodide();\r\n await pyodide.loadPackage(['micropip', 'ssl', 'setuptools']);\r\n let output = await pyodide.runPythonAsync(\\`\r\n import micropip\r\n await micropip.install('h11==0.12.0')\r\n await micropip.install('http://localhost:8529/$wheel')\r\n import ssl\r\n import setuptools\r\n from datasette.app import Datasette\r\n ds = Datasette(memory=True, settings={'num_sql_threads': 0})\r\n (await ds.client.get('/_memory.json?sql=select+55+as+itworks&_shape=array')).text\r\n \\`);\r\n if (JSON.parse(output)[0].itworks != 55) {\r\n throw 'Got ' + output + ', expected itworks: 55';\r\n }\r\n return 'Test passed!';\r\n}\r\n\"\r\n\r\n# Shut down the server\r\npkill -f 'http.server 8529'\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1223459734, "label": "Automated test for Pyodide compatibility"}, "performed_via_github_app": null}