dependabot[bot] 259d6bbd69
Bump actions/checkout from 4.1.0 to 4.1.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 06:48:11 +00:00

75 lines
2.2 KiB
YAML

name: "ignore_paths"
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
permissions: {}
jobs:
ignore_paths:
name: ignore_paths
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Run ShellCheck
uses: ./
id: check
with:
ignore_paths: ignore ./testfiles/ignore_some/duplicate_name.bash **/ignore_some/ignore.bash
- name: Verify check
run: |
fail=false
# verify a non-ignored path is not excluded
expect="testfiles/test.bash"
if [[ ! "${{ steps.check.outputs.files }}" =~ $expect ]];then
echo "::error:: Expected file $expect not found in ${{ steps.check.outputs.files }}"
fail=true
fi
# verify a file with the same name as an ignored file but at a
# different path is not excluded
expect="testfiles/duplicate_name.bash"
if [[ ! "${{ steps.check.outputs.files }}" =~ $expect ]];then
echo "::error:: Expected file $expect not found in ${{ steps.check.outputs.files }}"
fail=true
fi
# verify ignored full path excluded
notexpect="testfiles/ignore_some/duplicate_name.bash"
if [[ "${{ steps.check.outputs.files }}" =~ $notexpect ]];then
echo "::error:: Unexpected file $notexpect found in ${{ steps.check.outputs.files }}"
fail=true
fi
# verify ignored directory excluded
notexpect="testfiles/ignore/ignore.bash"
if [[ "${{ steps.check.outputs.files }}" =~ $notexpect ]];then
echo "::error:: Unexpected file $notexpect found in ${{ steps.check.outputs.files }}"
fail=true
fi
# verify ignored glob excluded
notexpect="testfiles/ignore_some/ignore.bash"
if [[ "${{ steps.check.outputs.files }}" =~ $notexpect ]];then
echo "::error:: Unexpected file $notexpect found in ${{ steps.check.outputs.files }}"
fail=true
fi
if $fail;then
exit 1
fi