mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-17 16:16:37 +00:00
Only run unit tests for crates that are changed
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
0f7928f65f
commit
7f1994e205
2 changed files with 12 additions and 1 deletions
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
@ -70,6 +70,7 @@ jobs:
|
|||
echo "has_detect_target_changed=$has_detect_target_changed" | tee -a "$GITHUB_OUTPUT"
|
||||
|
||||
test:
|
||||
needs: changed-files
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -95,6 +96,16 @@ jobs:
|
|||
with:
|
||||
tools: cargo-nextest
|
||||
|
||||
- name: Decide crates to test
|
||||
env:
|
||||
CRATES_CHANGED: ${{ needs.changed-files.outputs.crates_changed }}
|
||||
run: |
|
||||
ARGS=""
|
||||
for crate in $CRATES_CHANGED; do
|
||||
ARGS="$ARGS -p $crate"
|
||||
done
|
||||
echo "$ARGS" | tee -a "$GITHUB_ENV"
|
||||
|
||||
- run: just test
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.CI_TEST_GITHUB_TOKEN }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue