From e5fdd14c27a987fad287819ce5ecd381e1728508 Mon Sep 17 00:00:00 2001 From: Antony David Date: Sun, 23 Jun 2024 19:30:43 +0200 Subject: [PATCH 1/2] ci: add cache & code fmt check --- .github/workflows/ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28874e8..2193c4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,8 @@ on: env: CARGO_TERM_COLOR: always - RUSTFLAGS: "-Dwarnings" + RUST_LOG: info + RUST_BACKTRACE: 1 CI: true jobs: @@ -18,8 +19,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install toolchain + uses: moonrepo/setup-rust@d8048d4fdff0633123678b093726e6d7c8ad6de5 # v1.2.0 + with: + components: clippy,rustfmt + cache-base: main + + - name: Check formatting + run: cargo fmt --check + - name: Run Clippy - run: cargo clippy --all-targets --all-features + run: cargo clippy - name: Build run: cargo build From e6b4ea046b14763cd34000290baa63de6066fc3a Mon Sep 17 00:00:00 2001 From: Antony David Date: Sun, 23 Jun 2024 19:37:26 +0200 Subject: [PATCH 2/2] ci: setup rust tag --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2193c4c..877cc75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,21 +17,22 @@ jobs: ci: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - name: Install toolchain - uses: moonrepo/setup-rust@d8048d4fdff0633123678b093726e6d7c8ad6de5 # v1.2.0 + uses: moonrepo/setup-rust@v1 with: components: clippy,rustfmt cache-base: main - name: Check formatting - run: cargo fmt --check + run: cargo fmt --all --check - name: Run Clippy run: cargo clippy - - name: Build + - name: Run Build run: cargo build - name: Run tests