From 3daf1c7ccf9f451a3736e8a9f4b2bc43c9e3d06c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 10:58:08 +0100 Subject: [PATCH] test: test the cargo fmt and clippy work --- .forgejo/workflows/test.yml | 10 ++++++++++ entrypoint.sh | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) 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}