name: Rust
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo apt-get install -y libseccomp-dev
- name: Build
run: cargo build --all-features --all-targets
- name: Run tests
run: cargo test --all-features --all-targets
- name: Run cargo clippy
run: rustup component add clippy && cargo clippy --all-features --all-targets -- -D warnings
- name: Check formatting
run: rustup component add rustfmt && cargo fmt --all -- --check