ci: add github actions

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
This commit is contained in:
Changyuan Lyu 2024-04-24 22:34:48 -07:00 committed by Lencerf
parent d3fb3af2bf
commit 9744d9ad0a
2 changed files with 36 additions and 0 deletions

8
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
commit-message:
prefix: "ci"

28
.github/workflows/rust.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Rust
permissions: read-all
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build_test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
- name: Build
run: cargo build --verbose
- name: Format
run: cargo fmt --check
# TODO: some KVM related tests cannot run in github runners.
# - name: Run tests
# run: cargo test --verbose
- name: Clippy
run: cargo clippy