mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 09:08:00 +00:00
Add tests for the Revive WASM version (#147)
This commit is contained in:
committed by
GitHub
parent
f49d145e9a
commit
d7d60da6f1
@@ -10,6 +10,7 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
REVIVE_WASM_INSTALL_DIR: ${{ github.workspace }}/target/wasm32-unknown-emscripten/release
|
||||
EMSCRIPTEN_VERSION: 3.1.64
|
||||
BUN_VERSION: 1.1.43
|
||||
|
||||
jobs:
|
||||
build-revive-wasm:
|
||||
@@ -77,3 +78,51 @@ jobs:
|
||||
${{ env.REVIVE_WASM_INSTALL_DIR }}/resolc.js
|
||||
${{ env.REVIVE_WASM_INSTALL_DIR }}/resolc.wasm
|
||||
retention-days: 1
|
||||
|
||||
test-revive-wasm:
|
||||
needs: build-revive-wasm
|
||||
strategy:
|
||||
matrix:
|
||||
os: ['ubuntu-24.04', 'macos-14', 'windows-2022']
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Create Target Directory
|
||||
run: mkdir -p ${{ env.REVIVE_WASM_INSTALL_DIR }}
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: revive-wasm
|
||||
path: ${{ env.REVIVE_WASM_INSTALL_DIR }}
|
||||
|
||||
- name: Set Up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install Bun on Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
|
||||
scoop install bun@${{ env.BUN_VERSION }}
|
||||
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
|
||||
|
||||
- name: Install Bun on macOS and Linux
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
curl -fsSL https://bun.sh/install | bash -s bun-v${{ env.BUN_VERSION }}
|
||||
echo "$HOME/.bun/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Confirm Installations
|
||||
run: |
|
||||
node --version
|
||||
bun --version
|
||||
|
||||
- name: Test revive
|
||||
run: |
|
||||
echo "Running tests for ${{ matrix.os }}"
|
||||
npm install
|
||||
npm run test:wasm
|
||||
|
||||
Reference in New Issue
Block a user