Skip to content

Detect dependencies and print unsupported message #490

Detect dependencies and print unsupported message

Detect dependencies and print unsupported message #490

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Check Rust
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"
- ".github/workflow/audits.yml"
- "supply-chain/**"
pull_request:
branches: ["main", "v*"]
paths-ignore:
- ".plugin-manifests/**"
- "*.md"
- "LICENSE"
- ".github/workflow/audits.yml"
- "supply-chain/**"
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.76
jobs:
lint-rust:
name: Lint Rust
runs-on: "ubuntu-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
- 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 Cloud Plugin
runs-on: ${{ matrix.os }}
needs: [lint-rust]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
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
- uses: Swatinem/rust-cache@v2
with:
shared-key: "${{ runner.os }}-full-${{ hashFiles('./Cargo.lock') }}"
- uses: actions/checkout@v4
- name: Cargo Build
run: cargo build --workspace --release --all-targets --all-features
env:
CARGO_INCREMENTAL: 0
test-rust:
name: Plugin Unit Tests
runs-on: ${{ matrix.os }}
needs: [lint-rust]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
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
- 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: trace