From 7e6cfbd27203cd6ebe0518a4520603ea41bc02ef Mon Sep 17 00:00:00 2001 From: Vignesh Venkat Date: Thu, 22 Feb 2024 14:36:33 -0800 Subject: [PATCH] add sample rust project --- test_rs/.github/workflows/ci-rustfmt.yml | 19 +++++++++++++++++++ test_rs/.gitignore | 1 + test_rs/Cargo.toml | 8 ++++++++ test_rs/src/main.rs | 4 ++++ 4 files changed, 32 insertions(+) create mode 100644 test_rs/.github/workflows/ci-rustfmt.yml create mode 100644 test_rs/.gitignore create mode 100644 test_rs/Cargo.toml create mode 100644 test_rs/src/main.rs diff --git a/test_rs/.github/workflows/ci-rustfmt.yml b/test_rs/.github/workflows/ci-rustfmt.yml new file mode 100644 index 0000000..6d5c864 --- /dev/null +++ b/test_rs/.github/workflows/ci-rustfmt.yml @@ -0,0 +1,19 @@ +name: CI Rustfmt +on: pull_request + +jobs: + format: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 + with: + toolchain: nightly + override: true + components: rustfmt + - uses: mbrobbel/rustfmt-check@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + mode: review diff --git a/test_rs/.gitignore b/test_rs/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/test_rs/.gitignore @@ -0,0 +1 @@ +/target diff --git a/test_rs/Cargo.toml b/test_rs/Cargo.toml new file mode 100644 index 0000000..bcd09ff --- /dev/null +++ b/test_rs/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "test_rs" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/test_rs/src/main.rs b/test_rs/src/main.rs new file mode 100644 index 0000000..a4f2e4f --- /dev/null +++ b/test_rs/src/main.rs @@ -0,0 +1,4 @@ +fn main() +{ + println!("Hello, world!"); +}