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'