name: tests
permissions:
contents: read
on:
push:
branches:
- main
paths-ignore:
- "**/*.md"
pull_request:
branches:
- main
paths-ignore:
- "**/*.md"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: "test-ubuntu-latest"
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler
cargo install cargo-hack --force
- name: Run tests for all features
run: cargo test --workspace
env:
RUSTFLAGS: "-Dwarnings"
- name: Run check all possible feature combinations
run: cargo hack check --feature-powerset
env:
RUSTFLAGS: "-Dwarnings"