Fix discovering executable files on macOS #228
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'scandir' | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- "master" | |
permissions: {} | |
jobs: | |
scandir: | |
name: scandir | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Run ShellCheck | |
uses: ./ | |
id: one | |
with: | |
scandir: testfiles/scandir | |
- name: Verify check | |
run: | | |
expect1="testfiles/scandir/run[[:space:]]me.bash" | |
expect2="testfiles/scandir/exec" | |
notexpect="testfiles/test.bash" | |
if [[ ! "${{ steps.one.outputs.files }}" =~ $expect1 ]];then | |
echo "::error:: Expected file $expect1 not found in ${{ steps.one.outputs.files }}" | |
exit 1 | |
if [[ ! "${{ steps.one.outputs.files }}" =~ $expect2 ]];then | |
echo "::error:: Expected file $expect2 not found in ${{ steps.one.outputs.files }}" | |
exit 1 | |
elif [[ "${{ steps.one.outputs.files }}" =~ $notexpect ]];then | |
echo "::error:: Expected file $notexpect found in ${{ steps.one.outputs.files }}" | |
exit 1 | |
fi | |
- name: Run ShellCheck | |
uses: ./ | |
id: two | |
with: | |
scandir: './testfiles/scandir' | |
ignore_paths: ignore | |
- name: Verify check | |
run: | | |
expect="testfiles/scandir/test.bash" | |
notexpect="testfiles/test.bash" | |
if [[ ! "${{ steps.two.outputs.files }}" =~ $expect ]];then | |
echo "::error:: Expected file $expect not found in ${{ steps.two.outputs.files }}" | |
exit 1 | |
fi | |
elif [[ "${{ steps.two.outputs.files }}" =~ $notexpect ]];then | |
echo "::error:: Expected file $notexpect found in ${{ steps.two.outputs.files }}" | |
exit 1 | |
fi |