X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@

- name: Install dependencies
uses: ./.github/actions/install-linux-deps
with: ${{ matrix.dependencies || fromJSON('{}') }}

Check failure on line 144 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / format_check

[actionlint] reported by reviewdog 🐶 "with" section is scalar node but mapping node is expected [syntax-check] Raw Output: e:.github/workflows/ci.yaml:144:15: "with" section is scalar node but mapping node is expected [syntax-check]

- uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -321,7 +321,7 @@

- name: run cpython tests to check if env polluters have stopped polluting
shell: bash
run: |

Check warning on line 324 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / format_check

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:16:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/ci.yaml:324:9: shellcheck reported issue in this script: SC2086:info:16:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 324 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / format_check

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:12:8: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/ci.yaml:324:9: shellcheck reported issue in this script: SC2086:info:12:8: Double quote to prevent globbing and word splitting [shellcheck]
for thing in ${{ join(matrix.env_polluting_tests, ' ') }}; do
for i in $(seq 1 10); do
set +e
Expand Down Expand Up @@ -411,7 +411,9 @@
- run: ruff format --check

- name: install prettier
run: yarn global add prettier && echo "$(yarn global bin)" >>$GITHUB_PATH
run: |
yarn global add prettier
yarn global bin >> "$GITHUB_PATH"

- name: check wasm code with prettier
# prettier doesn't handle ignore files very well: https://github.com/prettier/prettier/issues/8506
Expand Down Expand Up @@ -487,7 +489,8 @@
cache-dependency-path: "wasm/demo/package-lock.json"
- name: run test
run: |
export PATH=$PATH:`pwd`/../../geckodriver
driver_path="$(pwd)/../../geckodriver"
export PATH="$PATH:${driver_path}"
npm install
npm run test
env:
Expand Down Expand Up @@ -551,6 +554,6 @@
- name: build rustpython
run: cargo build --release --target wasm32-wasip1 --features freeze-stdlib,stdlib --verbose
- name: run snippets
run: wasmer run --dir `pwd` target/wasm32-wasip1/release/rustpython.wasm -- `pwd`/extra_tests/snippets/stdlib_random.py
run: wasmer run --dir $(pwd) target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/extra_tests/snippets/stdlib_random.py"

Check warning on line 557 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / format_check

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting [shellcheck] Raw Output: w:.github/workflows/ci.yaml:557:9: shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting [shellcheck]
- name: run cpython unittest
run: wasmer run --dir `pwd` target/wasm32-wasip1/release/rustpython.wasm -- `pwd`/Lib/test/test_int.py
run: wasmer run --dir $(pwd) target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/Lib/test/test_int.py"

Check warning on line 559 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / format_check

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting [shellcheck] Raw Output: w:.github/workflows/ci.yaml:559:9: shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting [shellcheck]
Comment on lines +557 to +559
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Quote $(pwd) in --dir argument for consistency.

The script path is properly quoted, but --dir $(pwd) is not. This inconsistency triggers SC2046 and could fail if the working directory contains spaces.

       - name: run snippets
-        run: wasmer run --dir $(pwd) target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/extra_tests/snippets/stdlib_random.py"
+        run: wasmer run --dir "$(pwd)" target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/extra_tests/snippets/stdlib_random.py"
       - name: run cpython unittest
-        run: wasmer run --dir $(pwd) target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/Lib/test/test_int.py"
+        run: wasmer run --dir "$(pwd)" target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/Lib/test/test_int.py"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: wasmer run --dir $(pwd) target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/extra_tests/snippets/stdlib_random.py"
- name: run cpython unittest
run: wasmer run --dir `pwd` target/wasm32-wasip1/release/rustpython.wasm -- `pwd`/Lib/test/test_int.py
run: wasmer run --dir $(pwd) target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/Lib/test/test_int.py"
run: wasmer run --dir "$(pwd)" target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/extra_tests/snippets/stdlib_random.py"
- name: run cpython unittest
run: wasmer run --dir "$(pwd)" target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/Lib/test/test_int.py"
🧰 Tools
🪛 GitHub Actions: Format Check

[warning] 556-556: actionlint (reviewdog) shellcheck reported issue: SC2046: Quote this to prevent word splitting (warning:1:18)


[warning] 558-558: actionlint (reviewdog) shellcheck reported issue: SC2046: Quote this to prevent word splitting (warning:1:18)

🪛 GitHub Check: format_check

[warning] 558-558:
[actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting [shellcheck]

Raw Output:
w:.github/workflows/ci.yaml:558:9: shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting [shellcheck]


[warning] 556-556:
[actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting [shellcheck]

Raw Output:
w:.github/workflows/ci.yaml:556:9: shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting [shellcheck]

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yaml around lines 556 - 558, The wasmer invocation uses
an unquoted --dir argument which can break on paths with spaces; update the
second run step that currently calls wasmer with --dir $(pwd) (the line running
rustpython.wasm on Lib/test/test_int.py) to quote the directory like --dir
"$(pwd)" so both runs are consistent and SC2046-safe.

2 changes: 2 additions & 0 deletions .github/workflows/pr-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
with:
persist-credentials: false

- uses: reviewdog/action-actionlint@0d952c597ef8459f634d7145b0b044a9699e5e43 # v1.71.0

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
Loading
X Tutup