name: CI
on:
push:
branches:
- master
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/**
pull_request:
branches:
- master
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/**
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo
- run: cargo build --all-features
- run: cargo build --no-default-features
- run: cargo build --no-default-features --features=builder
- run: cargo build --no-default-features --features=graphql
- run: cargo fmt -- --check --verbose
- run: cargo clippy --verbose
- run: cargo test --verbose
- run: cargo test --all-features --verbose