-
Notifications
You must be signed in to change notification settings - Fork 3
112 lines (88 loc) · 2.72 KB
/
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
on:
push:
branches:
- 'master'
paths-ignore:
- 'bindings/prose-sdk-js/Cargo.toml'
- 'CHANGELOG.md'
- 'xtask/**'
- '.github/**'
pull_request:
branches:
- '**'
name: Test and Build
jobs:
test-native:
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
components: rustfmt
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Verify versions
run: rustc --version && rustup --version && cargo --version && sqlite3 --version
- name: Cache build context
id: cache-cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: test-${{ runner.os }}-cargo
- name: Check code style
run: cargo fmt -- --check
- name: Build crates
run: cargo build
- name: Build prose-sdk-ffi
run: cargo build --package prose-sdk-ffi
- name: Build examples
run: cargo build --package prose-core-client-cli --package xmpp-client
- name: Test code
run: cargo test --features test
- name: Run core-client integration tests
run: cargo test --package prose-core-integration-tests
- name: Run store integration tests
run: cargo test --package prose-store-integration-tests
test-wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
components: rustfmt
override: true
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.4.0
- name: Verify versions
run: rustc --version && rustup --version && cargo --version
- name: Cache build context
id: cache-cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: test-${{ runner.os }}-cargo
- name: Build prose-sdk-js
run: cargo build --package prose-sdk-js --target wasm32-unknown-unknown
- name: Run Wasm core-client integration tests
run: cargo xtask ci wasm
- name: Run Wasm store integration tests
run: cargo xtask ci wasm-store