name: CI Tests
on:
push:
branches:
- master
- 'feature-**'
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update local toolchain
run: |
rustup update
rustup component add clippy
rustup component add rustfmt
rustup install nightly
- name: Toolchain info
run: |
cargo --version --verbose
rustc --version
cargo clippy --version
- name: Lint
run: |
cargo fmt -- --check
cargo clippy -- -D warnings
- name: Test Default Features
run: |
cargo check
cargo test --all
- name: Test No Features
run: |
cargo check --no-default-features
cargo test --all --no-default-features
- name: Test All Features
run: |
cargo check --all-features
cargo test --all --all-features
- name: Test Each Feature
run: |
for feature in $(cargo read-manifest | jq -r '.features | keys[]'); do
printf '\n\n\n---------------------------------------------------------------------------'
printf "\n\n\t TESTING FEATURE: $feature\n\n"
cargo check --features $feature
cargo test --all --features $feature
done
- name: Build
run: |
cargo build --release