test: test the cargo fmt and clippy work
This commit is contained in:
parent
18e606baa8
commit
3daf1c7ccf
2 changed files with 13 additions and 1 deletions
|
@ -15,6 +15,16 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Test
|
||||||
uses: https://git.kemitix.net/kemitix/rust@next
|
uses: https://git.kemitix.net/kemitix/rust@next
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -26,7 +26,9 @@ if [[ "${ARGS[0]}" == v1* ]]; then
|
||||||
fi
|
fi
|
||||||
echo "Selected toolchain: ${TOOLCHAIN}"
|
echo "Selected toolchain: ${TOOLCHAIN}"
|
||||||
|
|
||||||
|
echo ">>> Update toolchain"
|
||||||
rustup update "${TOOLCHAIN}"
|
rustup update "${TOOLCHAIN}"
|
||||||
|
echo ">>> Install rustfmt and clippy"
|
||||||
rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy
|
rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy
|
||||||
|
|
||||||
if test "${ARGS[0]}" == "cargo";then
|
if test "${ARGS[0]}" == "cargo";then
|
||||||
|
@ -44,5 +46,5 @@ COMMAND=$(
|
||||||
)
|
)
|
||||||
|
|
||||||
# execute command
|
# execute command
|
||||||
echo "${PRE_COMMAND} ${COMMAND}"
|
echo ">>> ${PRE_COMMAND} ${COMMAND}"
|
||||||
${PRE_COMMAND} ${COMMAND}
|
${PRE_COMMAND} ${COMMAND}
|
||||||
|
|
Loading…
Reference in a new issue