From 441dd9f254524d7d361b0065d8cce84f21b939bf Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 4 Nov 2022 11:08:33 -0600 Subject: [PATCH 1/3] chore: improve test coverage --- .github/workflows/test.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 84753ab7..721c82be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -425,6 +425,27 @@ jobs: exit 1 shell: bash + - name: Run changed-files with dir_names + id: changed-files-dir-names-specific + uses: ./ + with: + base_sha: d1c0ee4 + sha: 4d04215 + fetch_depth: 60000 + dir_names: "true" + files: test/** + - name: Show output + run: | + echo '${{ toJSON(steps.changed-files-dir-names-specific.outputs) }}' + shell: + bash + - name: Check dir_names output + if: "!contains(steps.changed-files-dir-names-specific.outputs.all_changed_files, 'test')" + run: | + echo "Invalid output: Expected to include (test) got (${{ steps.changed-files-dir-names-specific.outputs.all_changed_files }})" + exit 1 + shell: + bash - name: Run changed-files with forward slash separator id: changed-files-forward-slash uses: ./ From dca71d6aaa68682ed5939f5b666086e15e42c364 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 4 Nov 2022 11:24:59 -0600 Subject: [PATCH 2/3] Update diff-sha.sh --- diff-sha.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diff-sha.sh b/diff-sha.sh index 2dfd12c6..4104daef 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -euo pipefail +set -euxo pipefail INITIAL_COMMIT="false" GITHUB_OUTPUT=${GITHUB_OUTPUT:-""} From 1fd624717d4f4e82d614b7a201a22e7ad7ce264c Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 4 Nov 2022 11:26:51 -0600 Subject: [PATCH 3/3] Update diff-sha.sh --- diff-sha.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diff-sha.sh b/diff-sha.sh index 4104daef..417ed52c 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -134,7 +134,7 @@ else CURRENT_BRANCH=$GITHUB_HEAD_REF echo "Fetching remote refs..." - git fetch --no-tags -u --progress --deepen=40000 + git fetch --no-tags -u --progress --deepen=40000 origin "$CURRENT_BRANCH":"$CURRENT_BRANCH" git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$TARGET_BRANCH":"$TARGET_BRANCH" echo "::debug::Getting HEAD SHA..."