This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
chore: adding node tests #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Quality Gate | |
permissions: | |
pull-requests: write | |
contents: write | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: '-D warnings' | |
CARGO_INCREMENTAL: 0 | |
RUST_BACKTRACE: short | |
jobs: | |
audit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Sources | |
uses: actions/checkout@v3 | |
- name: Install Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
default: true | |
- uses: Swatinem/rust-cache@v1 | |
- name: Install Audit | |
run: cargo install cargo-audit | |
- name: Run Audit | |
run: cargo audit | |
lint: | |
name: lint-and-format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
default: true | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v1 | |
- name: Test Format | |
run: cargo fmt -- --check | |
- run: cargo clippy --tests --all-features --all-targets -- -D clippy::all | |
cargo-doc: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: run cargo doc | |
run: RUSTDOCFLAGS="-D warnings" cargo doc | |
test: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
toolchain: [stable] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: "${{ matrix.toolchain }}" | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
default: true | |
- uses: Swatinem/rust-cache@v1 | |
- name: Add wasm32 target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Check with with features | |
run: cargo check --verbose --all-features | |
- name: Run tests with features | |
run: cargo test --verbose --all-features | |