Skip to content

Added a matrix build to run tests for different crate features. #19

Added a matrix build to run tests for different crate features.

Added a matrix build to run tests for different crate features. #19

Workflow file for this run

name: build
on:
pull_request:
types: [ opened, reopened, synchronize, edited, ready_for_review ]
push:
branches: [ "**" ]
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-*
jobs:
test:
strategy:
matrix:
features:
- ""
- "--no-default-features"
- "--features=stream"
- "--features=uom"
- "--features=stream,uom"
- "--all-features"
name: Test and Verify
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b #4.1.5
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@8504a5cb1826786b18ef7a8819e6fddaf9f3eb8d
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu
- name: Prepare Rust Toolchain Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #4.0.2
with:
path: |
~/.rustup/toolchains
~/.rustup/update-hashes
~/.rustup/settings.toml
key: rust-toolchain-${{ github.job }}
- name: Prepare Rust Dependency Cache
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 #2.7.3
- name: "Test"
run: cargo test ${{ matrix.features }}