diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 102f1a2..ba6e2c9 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -15,6 +15,16 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Format + uses: https://git.kemitix.net/kemitix/rust@next + with: + args: ${{ matrix.toolchain.name }} cargo fmt --check + + - name: Clippy + uses: https://git.kemitix.net/kemitix/rust@next + with: + args: ${{ matrix.toolchain.name }} cargo clippy + - name: Test uses: https://git.kemitix.net/kemitix/rust@next with: diff --git a/entrypoint.sh b/entrypoint.sh index d39547b..195dda1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,7 +26,9 @@ if [[ "${ARGS[0]}" == v1* ]]; then fi echo "Selected toolchain: ${TOOLCHAIN}" +echo ">>> Update toolchain" rustup update "${TOOLCHAIN}" +echo ">>> Install rustfmt and clippy" rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy if test "${ARGS[0]}" == "cargo";then @@ -44,5 +46,5 @@ COMMAND=$( ) # execute command -echo "${PRE_COMMAND} ${COMMAND}" +echo ">>> ${PRE_COMMAND} ${COMMAND}" ${PRE_COMMAND} ${COMMAND}