-
Notifications
You must be signed in to change notification settings - Fork 28
54 lines (45 loc) · 1.48 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
name: Test Wadm
on:
pull_request:
branches:
- main
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
nats_version: [2.10.7]
steps:
- uses: actions/checkout@v4
- name: Install latest Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt
# Cache: rust
- uses: Swatinem/rust-cache@v2
with:
key: '${{ matrix.os }}-rust-cache'
- name: Check that Wadm JSON Schema is up-to-date
shell: bash
run: |
cargo run --bin wadm-schema
if [ $(git diff --exit-code > /dev/null) ]; then
echo 'Wadm JSON Schema is out of date. Please run `cargo run --bin wadm-schema` and commit the changes.'
exit 1
fi
- name: Install wash
uses: wasmCloud/common-actions/install-wash@main
# GH Actions doesn't currently support passing args to service containers and there is no way
# to use an environment variable to turn on jetstream for nats, so we manually start it here
- name: Start NATS
run: docker run --rm -d --name wadm-test -p 127.0.0.1:4222:4222 nats:${{ matrix.nats_version }} -js
- name: Build
run: |
cargo build --all-features --all-targets --workspace
# Run all tests
- name: Run tests
run: |
cargo test --workspace -- --nocapture