From f230bfc7bbf9105b8dc5eb601606746240895634 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sat, 23 Dec 2023 14:37:08 +0100 Subject: [PATCH] Run cargo marker with `--all-targets --all-features [--locked]` in GitHub action It looks like this is the default way linting should be run --- action.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 8f336cae..6fb30760 100644 --- a/action.yml +++ b/action.yml @@ -23,6 +23,14 @@ runs: - run: ${GITHUB_ACTION_PATH:?}/scripts/release/install.${{ runner.os == 'Windows' && 'ps1' || 'sh' }} shell: bash - - run: cargo marker + # Run the check with `--locked` only if there is a `Cargo.lock` file present in the + # repository. Not everyone checks in the `Cargo.lock` file into the version control, + # but if they do they would want this command to run with `--locked` to ensure that + # the lock file is up to date. + - run: | + cargo marker -- --all-targets --all-features${{ + hashFiles('./Cargo.lock') != '' && ' --locked' || '' + }} + if: ${{ inputs.install-only == 'false' }} shell: bash