mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-04 11:10:02 +00:00
Fix job changed-files in ci.yml (#1730)
* Fix job changed-files in ci.yml When there are multiple crates, it would be in multiple lines, breaking github output * Fix job changed-files in ci.yml When no crate is changed, command cut will fail. * Fix job unit-tests in ci.yml If noo crate is changed, do not run cargo-nextest. * Fix ci.yml syntax
This commit is contained in:
parent
2feac66e14
commit
4d7a91aa4c
1 changed files with 3 additions and 2 deletions
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
@ -64,9 +64,9 @@ jobs:
|
||||||
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
crates_changed="$(echo "$ALL_CHANGED_FILES" | grep crates | cut -d / -f 2)"
|
crates_changed="$(echo "$ALL_CHANGED_FILES" | grep crates | cut -d / -f 2 || echo)"
|
||||||
has_detect_target_changed="$(echo "$crates_changed" | grep -q detect-targets && echo true || echo false)"
|
has_detect_target_changed="$(echo "$crates_changed" | grep -q detect-targets && echo true || echo false)"
|
||||||
echo "crates_changed=$crates_changed" | tee -a "$GITHUB_OUTPUT"
|
echo "crates_changed=${crates_changed//$'\n'/ }" | tee -a "$GITHUB_OUTPUT"
|
||||||
echo "has_detect_target_changed=$has_detect_target_changed" | tee -a "$GITHUB_OUTPUT"
|
echo "has_detect_target_changed=$has_detect_target_changed" | tee -a "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
|
@ -108,6 +108,7 @@ jobs:
|
||||||
echo "CARGO_NEXTEST_ADDITIONAL_ARGS=$ARGS" | tee -a "$GITHUB_ENV"
|
echo "CARGO_NEXTEST_ADDITIONAL_ARGS=$ARGS" | tee -a "$GITHUB_ENV"
|
||||||
|
|
||||||
- run: just unit-tests
|
- run: just unit-tests
|
||||||
|
if: env.CARGO_NEXTEST_ADDITIONAL_ARGS != ''
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.CI_TEST_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.CI_TEST_GITHUB_TOKEN }}
|
||||||
CI_UNIT_TEST_GITHUB_TOKEN: ${{ secrets.CI_UNIT_TEST_GITHUB_TOKEN }}
|
CI_UNIT_TEST_GITHUB_TOKEN: ${{ secrets.CI_UNIT_TEST_GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue