-
Notifications
You must be signed in to change notification settings - Fork 8
71 lines (53 loc) · 1.55 KB
/
build-and-test.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
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: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
SCCACHE_GHA_ENABLED: 'true'
RUSTC_WRAPPER: 'sccache'
jobs:
build_and_test_rust:
name: Build and Test Rust
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Build Cargo crates
run: cargo build --release
- name: Test Cargo crates
run: cargo test
- name: Lint Rust
run: cargo clippy
- name: Check Rust formatting
run: cargo fmt --all -- --check
build_and_test_js:
name: Build and Test JavaScript
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/actions/setup-pnpm
- uses: ./.github/actions/setup-dfx
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: DFX prepare Certified Counter
working-directory: examples/certified-counter
run: |
dfx canister create --all
dfx generate backend
- name: Build NPM packages
run: pnpm build
- name: Test NPM packages
run: pnpm test
- name: Wasm test
run: wasm-pack test --node packages/ic-response-verification --features=js
- name: Check Typescript formatting
run: pnpm run format:check