test: test the cargo fmt and clippy work
All checks were successful
/ test (map[name:stable]) (push) Successful in 2m15s
/ test (map[name:v1.81.0]) (push) Successful in 12s
/ test (map[name:nightly]) (push) Successful in 2m48s

This commit is contained in:
Paul Campbell 2024-09-17 10:58:08 +01:00
parent 18e606baa8
commit 3daf1c7ccf
2 changed files with 13 additions and 1 deletions

View file

@ -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:

View file

@ -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}