kanidm/.github/workflows/rust.yml

44 lines
847 B
YAML
Raw Normal View History

name: Rust
# Trigger the workflow on push or pull request
on: [push, pull_request]
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install rustfmt
run: rustup component add rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt install -y \
libsqlite3-dev \
libpam0g-dev \
libssl1.0-dev
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose