From 2c6eeee8a571808b3b96b0aa8862ff930b5f596c Mon Sep 17 00:00:00 2001 From: Markus Rudy Date: Sat, 22 Jun 2024 18:43:31 +0200 Subject: [PATCH] Run Rust tests with Github Actions --- .github/workflows/presubmit-rust.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/presubmit-rust.yml diff --git a/.github/workflows/presubmit-rust.yml b/.github/workflows/presubmit-rust.yml new file mode 100644 index 0000000..dcbbee9 --- /dev/null +++ b/.github/workflows/presubmit-rust.yml @@ -0,0 +1,31 @@ +name: rust-presubmit +on: + push: + branches: ['master'] + pull_request: + paths: ['rust/**', '.github/workflows/presubmit-rust.yml'] + +defaults: + run: + working-directory: rust + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: fmt + run: cargo fmt --check + - name: check + run: cargo check --all-targets --all-features + - name: clippy + run: cargo clippy --all-targets --all-features + + unit-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: build + run: cargo build --all-targets --all-features + - name: test + run: cargo test --all-features