forked from near-daos/sputnik-dao-contract
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.21 KB
/
tests.yml
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
name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
tests:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Build
env:
IS_GITHUB_ACTION: true
run: mkdir res && cd astra && cargo build --release --target wasm32-unknown-unknown
- name: Build
env:
IS_GITHUB_ACTION: true
run: cargo +stable build --workspace --target wasm32-unknown-unknown --release
- name: Wasm copy
run: |
cp target/wasm32-unknown-unknown/release/astra.wasm res
cp target/wasm32-unknown-unknown/release/astra_factory.wasm res
cp target/wasm32-unknown-unknown/release/astra_staking.wasm res
cp target/wasm32-unknown-unknown/release/test_token.wasm res
- name: Run Cargo tests
env:
IS_GITHUB_ACTION: true
run: cargo test --workspace -- --nocapture
- name: Run Ava tests
env:
IS_GITHUB_ACTION: true
run: cd astra && sh test.sh