diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 541b72015..47dd0af3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -318,6 +318,7 @@ jobs: - name: Setup rust run: | curl https://sh.rustup.rs | sh -s -- -y + cargo install cargo-component if: steps.metadata.outputs.module == 'wasm-wasi-component' - name: Configure wasm-wasi-component @@ -347,18 +348,22 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3' - if: steps.metadata.outputs.module != 'wasm' && - steps.metadata.outputs.module != 'wasm-wasi-component' + if: steps.metadata.outputs.module != 'wasm' - name: Install pytest run: | - sudo -H pip install pytest - if: steps.metadata.outputs.module != 'wasm' && - steps.metadata.outputs.module != 'wasm-wasi-component' + if [ "${{ matrix.build }}" == "wasm-wasi-component" ]; then + pip install pytest + else + sudo -H pip install pytest + fi + if: steps.metadata.outputs.module != 'wasm' - name: Run ${{ steps.metadata.outputs.module }} tests run: | - sudo -E pytest --print-log ${{ steps.metadata.outputs.testpath }} - # Skip pytest if wasm build, as there are no tests yet - if: steps.metadata.outputs.module != 'wasm' && - steps.metadata.outputs.module != 'wasm-wasi-component' + if [ "${{ matrix.build }}" == "wasm-wasi-component" ]; then + pytest --print-log ${{ steps.metadata.outputs.testpath }} + else + sudo -E pytest --print-log ${{ steps.metadata.outputs.testpath }} + fi + if: steps.metadata.outputs.module != 'wasm' diff --git a/test/test_wasm_component.py b/test/test_wasm-wasi-component.py similarity index 100% rename from test/test_wasm_component.py rename to test/test_wasm-wasi-component.py diff --git a/test/unit/applications/lang/wasm_component.py b/test/unit/applications/lang/wasm_component.py index 6f7b55187..1d58afd6a 100644 --- a/test/unit/applications/lang/wasm_component.py +++ b/test/unit/applications/lang/wasm_component.py @@ -41,7 +41,7 @@ def prepare_env(script): def load(self, script, **kwargs): self.prepare_env(script) - component_path = f'{option.temp_dir}/wasm_component/{script}/target/wasm32-wasi/release/test_wasi_component.wasm' + component_path = f'{option.temp_dir}/wasm_component/{script}/target/wasm32-wasip1/release/test_wasi_component.wasm' self._load_conf( { diff --git a/test/unit/status.py b/test/unit/status.py index d8bb4e41e..679008d01 100644 --- a/test/unit/status.py +++ b/test/unit/status.py @@ -31,7 +31,7 @@ def find_diffs(d1, d2): if k in d2 } - if isinstance(d1, str): + if isinstance(d1, str) or isinstance(d1, list): return d1 == d2 return d1 - d2