|
79 | 79 | ':benches/**' \ |
80 | 80 | ':example_projects/**' \ |
81 | 81 | ':extra_tests/snippets/**' \ |
| 82 | + ':extra_tests/test_snippets.py' \ |
| 83 | + ':extra_tests/rustpython_wasi.sh' \ |
| 84 | + ':extra_tests/requirements.txt' \ |
82 | 85 | ':.github/workflows/ci.yaml' \ |
83 | 86 | ; then |
84 | 87 | echo "changed=false" >> "$GITHUB_OUTPUT" |
@@ -1055,7 +1058,6 @@ jobs: |
1055 | 1058 | builtin_memoryview |
1056 | 1059 | builtin_open |
1057 | 1060 | builtin_posixshmem |
1058 | | - builtin_slice |
1059 | 1061 | builtin_str |
1060 | 1062 | builtin_thread |
1061 | 1063 | cli_int_max_str_digits |
@@ -1179,19 +1181,23 @@ jobs: |
1179 | 1181 | - name: build rustpython |
1180 | 1182 | if: env.RUN_WASM_WASI == 'true' |
1181 | 1183 | run: cargo build --locked --profile wasm-release --target wasm32-wasip1 --no-default-features --features freeze-stdlib,stdlib,stdio,importlib,host_env,doc,ucd_3_2_0 --verbose |
| 1184 | + - name: Setup Python for the snippet harness |
| 1185 | + if: env.RUN_WASM_WASI == 'true' |
| 1186 | + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| 1187 | + with: |
| 1188 | + python-version-file: .python-version |
| 1189 | + |
| 1190 | + - name: Install snippet harness dependencies |
| 1191 | + if: env.RUN_WASM_WASI == 'true' |
| 1192 | + run: python -m pip install -r extra_tests/requirements.txt |
| 1193 | + |
1182 | 1194 | - name: run snippets |
1183 | 1195 | if: env.RUN_WASM_WASI == 'true' |
1184 | | - run: | |
1185 | | - exclude=" $WASM_WASI_SNIPPET_EXCLUDE " |
1186 | | - for path in extra_tests/snippets/*.py; do |
1187 | | - name=$(basename "$path" .py) |
1188 | | - case "$exclude" in |
1189 | | - *" $name "*) continue ;; |
1190 | | - esac |
1191 | | - echo "::group::${path}" |
1192 | | - wasmer run --volume "$(pwd)" target/wasm32-wasip1/wasm-release/rustpython.wasm -- "$(pwd)/${path}" |
1193 | | - echo "::endgroup::" |
1194 | | - done |
| 1196 | + working-directory: extra_tests |
| 1197 | + env: |
| 1198 | + RUSTPYTHON: ${{ github.workspace }}/extra_tests/rustpython_wasi.sh |
| 1199 | + RUSTPYTHON_SNIPPET_EXCLUDE: ${{ env.WASM_WASI_SNIPPET_EXCLUDE }} |
| 1200 | + run: pytest -v test_snippets.py -k test_rustpython_ |
1195 | 1201 | - name: run cpython unittest |
1196 | 1202 | if: env.RUN_WASM_WASI == 'true' |
1197 | 1203 | run: | |
|
0 commit comments