-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (70 loc) · 2.03 KB
/
unittest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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" }'