Skip to content

center: update project-single hbs #108

center: update project-single hbs

center: update project-single hbs #108

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- main
tags: ["v*"]
env:
CARGO_TERM_COLOR: always
concurrency:
group: unittest-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Update local toolchain
run: |
rustup update stable
rustup component add rustfmt
rustup target add wasm32-wasi
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "unittest"
- name: Install wasm-tools
run: cargo install wasm-tools
- name: Build testing wasm
run: |
chmod +x ./deploy/download-wasm-deps.sh
./deploy/download-wasm-deps.sh
chmod +x ./tests/build_tests_wasm.sh
./tests/build_tests_wasm.sh
- name: Run Tests
run: cargo test --workspace --release
- name: Build cli, runtime and integration-test
run: |
chmod +x ./tests/build_integration_test.sh
./tests/build_integration_test.sh
- name: Upload cli, runtime and integration-test
uses: actions/upload-artifact@v3
with:
name: integration-test
path: integration-test.tar.gz
integration-test:
runs-on: ubuntu-latest
needs: unit-test
steps:
- name: Update local toolchain
run: |
rustup update stable
rustup component add rustfmt
rustup target add wasm32-wasi
- name: Download cli, runtime and integration-test
uses: actions/download-artifact@v3
with:
name: integration-test
- name: Run integration-test
run: |
tar -xzf integration-test.tar.gz
chmod +x ./download_deps.sh
./download_deps.sh x86_64 linux
chmod +x ./integration-test
chmod +x ./land-cli
chmod +x ./land-runtime
./integration-test
env:
SDK_VERSION: '{ git = "https://github.com/fuxiaohei/runtime-land" }'