Merge pull request #758 from tj-actions/chore/improve-test-coverage
chore: improve test coverage
This commit is contained in:
commit
a14ccf053e
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
@ -425,6 +425,27 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
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
|
- name: Run changed-files with forward slash separator
|
||||||
id: changed-files-forward-slash
|
id: changed-files-forward-slash
|
||||||
uses: ./
|
uses: ./
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -euo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
INITIAL_COMMIT="false"
|
INITIAL_COMMIT="false"
|
||||||
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
||||||
@ -134,7 +134,7 @@ else
|
|||||||
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
||||||
|
|
||||||
echo "Fetching remote refs..."
|
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"
|
git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$TARGET_BRANCH":"$TARGET_BRANCH"
|
||||||
|
|
||||||
echo "::debug::Getting HEAD SHA..."
|
echo "::debug::Getting HEAD SHA..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user