Skip to content

Fix Exclude Input Identifier Error #15

Fix Exclude Input Identifier Error

Fix Exclude Input Identifier Error #15

name: Entrypoint Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-entrypoint:
runs-on: ubuntu-22.04
container:
image: silkeh/clang:14
steps:
- uses: actions/checkout@v2
- name: Basic command works
env:
INPUT_SOURCES: 'examples/*.c'
INPUT_EXCLUDES: 'examples/file2.c'
INPUT_STYLE: "LLVM"
run: |
./entrypoint.sh | tee output || true
echo "Ran entrypoint.sh -> $?"
count1=$(grep -c "Checking file: ./examples/file1.c" output) || true
echo "grep 1 -> $count1 -> $?"
if [ $count1 -ne 1 ]; then
echo "file1.c should be checked"
exit 8
fi
echo "file1.c is checked $?"
count2=$(grep -c "Checking file: ./examples/file2.c" output) || true
echo "grep 2 -> $count2 -> $?"
if [ $count2 -ne 0 ]; then
echo "file2.c should not be checked"
exit 9
fi
echo "file2.c is checked $?"
echo "Basic command works"