From b0b40dd2ecf762694966e52f8c030c6d32de95dc Mon Sep 17 00:00:00 2001 From: Gris Ge Date: Tue, 13 Aug 2024 09:26:39 +0800 Subject: [PATCH] Enable initial CI Signed-off-by: Gris Ge --- .github/workflows/clippy-rustfmt.yml | 31 ++++++++++++++++++++++++++++ .github/workflows/license.yml | 19 +++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/clippy-rustfmt.yml create mode 100644 .github/workflows/license.yml diff --git a/.github/workflows/clippy-rustfmt.yml b/.github/workflows/clippy-rustfmt.yml new file mode 100644 index 0000000..b52f76a --- /dev/null +++ b/.github/workflows/clippy-rustfmt.yml @@ -0,0 +1,31 @@ +name: Rustfmt and clippy check + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - main + +jobs: + rustfmt_clippy: + strategy: + fail-fast: true + + name: Rustfmt and clippy check + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install Rust Nightly + run: | + rustup override set nightly + rustup update nightly + rustup component add rustfmt clippy + + - name: rustfmt + run: cargo fmt --all -- --check + + - name: cargo clippy + run: cargo clippy diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml new file mode 100644 index 0000000..919b3d0 --- /dev/null +++ b/.github/workflows/license.yml @@ -0,0 +1,19 @@ +name: license + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - main + +jobs: + check-license: + name: Check License + runs-on: ubuntu-latest + timeout-minutes: 3 + + steps: + - uses: actions/checkout@v3 + - name: Check License Header + uses: apache/skywalking-eyes@v0.3.0