Skip to content

Commit 1de4e76

Browse files
committed
Fix a couple issues
1 parent 9023900 commit 1de4e76

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
steps:
8484
- uses: composer/api-surface-check@main
8585
with:
86-
# install-dependencies: true
86+
# install-dependencies: false
8787
# paths: src/**/*.php
8888
# source-roots: src
8989
# include-internal: false

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ runs:
9090
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9191
with:
9292
ref: refs/pull/${{ steps.pr.outputs.number }}/head
93-
fetch-depth: 0
93+
fetch-depth: 1
9494
persist-credentials: false
9595

9696
- name: Fetch base ref
9797
if: steps.pr.outputs.number
9898
shell: bash
99-
run: git fetch --no-tags origin "${{ steps.pr.outputs.base-ref }}:refs/remotes/origin/${{ steps.pr.outputs.base-ref }}"
99+
run: git fetch --no-tags --depth=1 origin "${{ steps.pr.outputs.base-ref }}:refs/remotes/origin/${{ steps.pr.outputs.base-ref }}"
100100

101101
- name: Preflight scan
102102
id: preflight
@@ -123,7 +123,7 @@ runs:
123123
if: steps.pr.outputs.number && steps.preflight.outputs.should-run == 'true'
124124
shell: bash
125125
working-directory: ${{ github.action_path }}
126-
run: composer install --no-interaction --no-progress --classmap-authoritative
126+
run: composer install --no-dev --no-interaction --no-progress --classmap-authoritative
127127

128128
- name: Install project dependencies
129129
id: project-deps

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"autoload-dev": {
1717
"psr-4": {
1818
"Composer\\ApiSurfaceCheck\\Tests\\": "tests/"
19-
}
19+
},
20+
"exclude-from-classmap": ["tests/fixtures/"]
2021
}
2122
}

scripts/detect.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ mkdir -p "${OUTPUT_DIR}"
4040

4141
# All files in scope (added, modified, or deleted) — snapshot.php will silently
4242
# ignore missing files, so we can pass the same list for both refs.
43-
mapfile -t changed_files < <(git diff "${BASE_REF}...HEAD" --diff-filter=AMD --name-only -- "${paths_array[@]}" || true)
43+
mapfile -t changed_files < <(git diff "${BASE_REF}..HEAD" --diff-filter=AMD --name-only -- "${paths_array[@]}" || true)
4444

4545
# Filter out empty entries
4646
changed_files=("${changed_files[@]/#/}")

scripts/preflight.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ done
2929

3030
mkdir -p "$(dirname "${OUTPUT_FILE}")"
3131

32-
diff_output=$(git diff "${BASE_REF}...HEAD" --unified=0 -- "${paths_array[@]}" 2>/dev/null || true)
32+
diff_output=$(git diff "${BASE_REF}..HEAD" --unified=0 -- "${paths_array[@]}" 2>/dev/null || true)
3333

3434
if [[ -z "${diff_output}" ]]; then
3535
echo "false" > "${OUTPUT_FILE}"

0 commit comments

Comments
 (0)