diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5da8a4..22dfbbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,9 @@ env: CARGO_TERM_COLOR: always JAVA_VERSION: 23 +permissions: + checks: write + jobs: style_rustfmt: name: Style / rustfmt @@ -35,18 +38,13 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: stable - - name: Setup JDK - uses: actions/setup-java@v4 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: corretto - uses: actions/checkout@v4 name: Checkout source code - name: Check code formatting with rustfmt - run: cargo fmt --check + uses: actions-rust-lang/rustfmt@v1 style_clippy_check: - name: Style / clippy & check + name: Style / clippy runs-on: ubuntu-latest steps: - name: Setup Rust @@ -62,10 +60,12 @@ jobs: name: Checkout source code - name: Restore Rust Build Cache uses: Leafwing-Studios/cargo-cache@v2 - - run: cargo check --all-targets --all-features --verbose - name: Cargo check - name: Run clippy - run: cargo clippy --no-deps --all-targets --all-features -- -D warnings + uses: auguwu/clippy-action@1.4.0 + with: + check-args: --all-targets --all-features --verbose + args: -D warnings + token: ${{secrets.GITHUB_TOKEN}} unit_test: name: Test / unit