Skip to content

ref(wadm-types): simplify results WIP #1070

ref(wadm-types): simplify results WIP

ref(wadm-types): simplify results WIP #1070

Workflow file for this run

name: Test Wadm
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
nats_version: [2.10.18]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install latest Rust stable toolchain
uses: dtolnay/rust-toolchain@1ff72ee08e3cb84d84adba594e0a297990fc1ed3 # stable
with:
toolchain: stable
components: clippy, rustfmt
# Cache: rust
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
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@bc9f2b3966835575aa6f70faafd9efb8e24992c4 # 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