From 6561ea108ae863eefa48126c0d4f494ec45ef7df Mon Sep 17 00:00:00 2001 From: Yung Siang Liau Date: Sun, 1 Oct 2023 16:21:58 +0800 Subject: [PATCH] Add lint checks --- .github/workflows/lint.yml | 21 +++++++++++++++++++++ .github/workflows/test.yml | 1 - 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..7a48243 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +name: lint + +on: + push: + branches: [ "main" ] + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Format + run: cargo fmt --check + - name: Clippy + run: cargo clippy -- -Dwarnings \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 847fa95..f86c012 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,6 @@ on: push: branches: [ "main" ] pull_request: - branches: [ "main" ] env: CARGO_TERM_COLOR: always