kdl/examples/ci.kdl

48 lines
1.1 KiB
Plaintext

// This example is a GitHub Action if it used KDL syntax.
// See .github/workflows/ci.yml for the file this was based on.
name CI
on push pull_request
env {
RUSTFLAGS -Dwarnings
}
jobs {
fmt_and_docs "Check fmt & build docs" {
runs-on ubuntu-latest
steps {
step uses="actions/checkout@v1"
step "Install Rust" uses="actions-rs/toolchain@v1" {
profile minimal
toolchain stable
components rustfmt
override #true
}
step rustfmt run="cargo fmt --all -- --check"
step docs run="cargo doc --no-deps"
}
}
build_and_test "Build & Test" {
runs-on "${{ matrix.os }}"
strategy {
matrix {
rust "1.46.0" stable
os ubuntu-latest macOS-latest windows-latest
}
}
steps {
step uses="actions/checkout@v1"
step "Install Rust" uses="actions-rs/toolchain@v1" {
profile minimal
toolchain "${{ matrix.rust }}"
components clippy
override #true
}
step Clippy run="cargo clippy --all -- -D warnings"
step "Run tests" run="cargo test --all --verbose"
}
}
}