Skip to content

Add binary app for running conformance tests #89

Add binary app for running conformance tests

Add binary app for running conformance tests #89

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: CI
on:
push:
branches: ["main", "v*"]
# Also run on tag pushes, as the release.yml doesn't currently run tests
tags: ["v*"]
paths-ignore:
- ".plugin-manifests/**"
- "*.md"
- "LICENSE"
pull_request:
branches: ["main", "v*"]
paths-ignore:
- ".plugin-manifests/**"
- "*.md"
- "LICENSE"
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.76
jobs:
lint-rust:
name: Lint Rust
runs-on: "ubuntu-latest"
steps:
# install dependencies
- name: Install Rust toolchain
run: |
rustup toolchain install ${{ env.RUST_VERSION }} --component clippy --component rustfmt
rustup default ${{ env.RUST_VERSION }}
- name: Install Wasm Rust target
run: rustup target add wasm32-wasi && rustup target add wasm32-unknown-unknown
- name: Install cargo-component
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-component
- uses: Swatinem/rust-cache@v2
with:
shared-key: "${{ runner.os }}-full-${{ hashFiles('./Cargo.lock') }}"
- uses: actions/checkout@v4
- name: Cargo Format
run:
cargo fmt --all -- --check
- name: Cargo Clippy
run:
cargo clippy --workspace --all-targets --all-features -- -D warnings
build-rust:
name: Build Plugin
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
# install dependencies
- name: Install latest Rust stable toolchain
run: |
rustup toolchain install ${{ env.RUST_VERSION }} --component clippy --component rustfmt --no-self-update
rustup default ${{ env.RUST_VERSION }}
- name: "Install Wasm Rust target"
run: rustup target add wasm32-wasi && rustup target add wasm32-unknown-unknown
- name: Install cargo-component
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-component
- uses: Swatinem/rust-cache@v2
with:
shared-key: "${{ runner.os }}-full-${{ hashFiles('./Cargo.lock') }}"
- uses: actions/checkout@v4
- name: Cargo Build
run: cargo build --release
env:
CARGO_INCREMENTAL: 0
test-rust:
name: Plugin Unit Tests
runs-on: "ubuntu-latest"
steps:
- name: Install latest Rust stable toolchain
run: |
rustup toolchain install ${{ env.RUST_VERSION }} --component clippy --component rustfmt --no-self-update
rustup default ${{ env.RUST_VERSION }}
- name: "Install Wasm Rust target"
run: rustup target add wasm32-wasi && rustup target add wasm32-unknown-unknown
- name: Install cargo-component
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-component
- uses: Swatinem/rust-cache@v2
with:
shared-key: "${{ runner.os }}-full-${{ hashFiles('./Cargo.lock') }}"
- uses: actions/checkout@v4
- name: Cargo Unit Tests
run: cargo test --all --no-fail-fast -- --nocapture
env:
CARGO_INCREMENTAL: 0
RUST_LOG: debug