CI-CD Updates and Repository PR Checks #2
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: Formatting Tests | |
on: | |
push: | |
branches: ["**"] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
env: | |
# The bash escape character is \033 | |
bashPass: \033[32;1mPASSED - | |
bashInfo: \033[33;1mINFO - | |
bashFail: \033[31;1mFAILED - | |
bashEnd: \033[0m | |
jobs: | |
get-files-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- env: | |
stepName: "Install Dependencies" | |
name: ${{ env.stepName }} | |
shell: bash | |
working-directory: formatting | |
run: | | |
# ${{ env.stepName }} | |
echo "::group::${{ env.stepName }}" | |
echo "$(pwd)" >> $GITHUB_PATH | |
sudo apt install fd-find | |
fdfind --version | |
exitStatus=$? | |
echo "::endgroup::" | |
if [ $exitStatus -eq 0 ]; then | |
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
exit 1 | |
fi | |
- env: | |
stepName: "Functional | Success | getFiles() No Arguments" | |
name: ${{ env.stepName }} | |
shell: bash | |
working-directory: formatting | |
run: | | |
# ${{ env.stepName }} | |
echo "::group::${{ env.stepName }}" | |
allFiles=$(grep -sril "copyright.*amazon" --include="*.c" --include="*.h") | |
files=$(getFiles) | |
echo -e "${{ env.bashInfo }} allFiles:\n$allFiles ${{ env.bashEnd }}" | |
echo -e "${{ env.bashInfo }} files:\n$files ${{ env.bashEnd }}" | |
exitStatus=0 | |
# Loop through all the files we found using grep | |
for file in ${allFiles[@]} ; do | |
echo -e "${{ env.bashInfo }} Checking File: $file ${{ env.bashEnd }}" | |
# Check if they're in the flattened version of getFiles() search | |
if ! [[ $files == *"$file"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files did not find file: $file ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
done | |
echo "::endgroup::" | |
if [ $exitStatus -eq 0 ]; then | |
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
exit 1 | |
fi | |
- env: | |
stepName: "Functional | Success | getFiles() Exclude Single File" | |
name: ${{ env.stepName }} | |
shell: bash | |
working-directory: formatting | |
run: | | |
# ${{ env.stepName }} | |
echo "::group::${{ env.stepName }}" | |
files=$(getFiles --exclude-files="test.c") | |
echo -e "${{ env.bashInfo }} files:\n$files ${{ env.bashEnd }}" | |
exitStatus=0 | |
if [[ "$files" == *"test.c"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files Found a file it should have skipped: test.c ${{ env.bashEnd }}" | |
exitStatus=1 | |
elif [[ "$files" != *"tasks.c"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files Did not find a file it should have: tasks.c ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
echo "::endgroup::" | |
if [ $exitStatus -eq 0 ]; then | |
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
exit 1 | |
fi | |
- env: | |
stepName: "Functional | Success | getFiles() Exclude Single Directory" | |
name: ${{ env.stepName }} | |
shell: bash | |
working-directory: formatting | |
run: | | |
# ${{ env.stepName }} | |
echo "::group::${{ env.stepName }}" | |
files=$(getFiles --exclude-dirs="goodFiles") | |
echo -e "${{ env.bashInfo }} files:\n$files ${{ env.bashEnd }}" | |
exitStatus=0 | |
if [[ "$files" == *"goodFiles"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files Found a directory it should have skipped: goodFiles ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
echo "::endgroup::" | |
if [ $exitStatus -eq 0 ]; then | |
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
exit 1 | |
fi | |
- env: | |
stepName: "Functional | Success | getFiles() Exclude Single Directory and File" | |
name: ${{ env.stepName }} | |
shell: bash | |
working-directory: formatting | |
run: | | |
# ${{ env.stepName }} | |
echo "::group::${{ env.stepName }}" | |
files=$(getFiles --exclude-dirs="goodFiles" --exclude-files="test.c") | |
echo -e "${{ env.bashInfo }} files:\n$files ${{ env.bashInfo }}" | |
exitStatus=0 | |
if [[ "$files" == *"test.c"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files Found a directory it should have skipped: goodFiles ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
echo "::endgroup::" | |
if [ $exitStatus -eq 0 ]; then | |
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
exit 1 | |
fi | |
- env: | |
stepName: "Functional | Success | getFiles() Include Extra Type" | |
name: ${{ env.stepName }} | |
shell: bash | |
working-directory: formatting | |
run: | | |
# ${{ env.stepName }} | |
echo "::group::${{ env.stepName }}" | |
files=$(getFiles --include-extensions="md") | |
echo -e "${{ env.bashInfo }} files:\n$files ${{ env.bashEnd }}" | |
exitStatus=0 | |
if [[ "$files" != *"README.md"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files Found a directory it should have skipped: goodFiles ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
echo "::endgroup::" | |
if [ $exitStatus -eq 0 ]; then | |
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
exit 1 | |
fi | |
- env: | |
stepName: "Functional | Success | getFiles() Exclude Two Directories and Two Files" | |
name: ${{ env.stepName }} | |
shell: bash | |
working-directory: formatting | |
run: | | |
# ${{ env.stepName }} | |
echo "::group::${{ env.stepName }}" | |
files="" | |
files=$(getFiles --exclude-dirs="filesWithCRLFEndings,include" --exclude-files="fileFormattedWithClangFormatV16.c,badFile.c") | |
echo -e "${{ env.bashInfo }} files:\n"$files" ${{ env.bashEnd }}" | |
exitStatus=0 | |
if [[ "$files" == *"fileFormattedWithClangFormatV16.c"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files Found a File it should have skipped: fileFormattedWithClangFormatV16.c ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [[ "$files" == *"badFile.c"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files Found a File it should have skipped: badFile.c ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [[ "$files" == *"filesWithCRLFEndings"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files Found a directory it should have skipped: filesWithCRLFEndings ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [[ "$files" == *"include"* ]]; then | |
echo -e "${{ env.bashFail }} Get Files Found a directory it should have skipped: include ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
echo "::endgroup::" | |
if [ $exitStatus -eq 0 ]; then | |
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" | |
exit 1 | |
fi | |
uncrustify-formatting-success-cases: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- env: | |
stepName: "Functional | Success | Exclude All Error Dirs" | |
name: ${{ env.stepName }} | |
id: exclude-dirs-with-errors | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "filesWithFormattingErrors,filesWithCRLFEndings,filesWithTrailingWhitespace" | |
exclude-files: "badFile.c" | |
- env: | |
stepName: "Functional | Success | Exclude Files" | |
name: ${{ env.stepName }} | |
id: exclude-files-with-errors | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: ",,," | |
exclude-files: "badFile.c,cgc_error.h,main-blinky.c,test.c" | |
- env: | |
stepName: "Functional | Success | Exclude File and Exclude Dirs" | |
name: ${{ env.stepName }} | |
id: exclude-single-dir-multiple-files | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "goodFiles" | |
exclude-files: "cgc_error.h,main-blinky.c,test.c" | |
- env: | |
stepName: "Functional | Success | Exclude Files and Exclude Dirs" | |
name: ${{ env.stepName }} | |
id: exclude-two-files-two-dirs | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "filesWithFormattingErrors,filesWithTrailingWhitespace" | |
exclude-files: "test.c,cgc_error.h,main-blinky.c,badFile.c" | |
uncrustify-formatting-error-cases: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- env: | |
stepName: "Functional | Failure | Whitespace, CRLF, and Format Failure" | |
name: ${{ env.stepName }} | |
id: all-format-errors | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
- env: | |
stepName: "Functional | Failure | CRLF and Formatting Error" | |
name: ${{ env.stepName }} | |
id: crlf-and-format-error | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "filesWithTrailingWhitespace" | |
- env: | |
stepName: "Functional | Failure | CRLF and Whitespace Error" | |
name: ${{ env.stepName }} | |
id: crlf-and-whitespace-error | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "filesWithFormattingErrors" | |
- env: | |
stepName: "Functional | Failure | CRLF Error" | |
name: ${{ env.stepName }} | |
id: crlf-error | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "filesWithFormattingErrors,filesWithTrailingWhitespace" | |
exclude-files: "badFile.c" | |
- env: | |
stepName: "Functional | Failure | Formatting and Whitespace Error" | |
name: ${{ env.stepName }} | |
id: formatting-and-whitespace-error | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "filesWithCRLFEndings" | |
- env: | |
stepName: "Functional | Failure | Formatting Error" | |
name: ${{ env.stepName }} | |
id: formatting-error | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "filesWithTrailingWhitespace,filesWithCRLFEndings" | |
- env: | |
stepName: "Functional | Failure | Whitespace Error" | |
name: ${{ env.stepName }} | |
id: whitespace-error | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "filesWithFormattingErrors,filesWithCRLFEndings" | |
- env: | |
stepName: "API | Failure | Exclude Dirs Error" | |
name: ${{ env.stepName }} | |
id: error-in-exclude-dirs | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-dirs: "filesWithFormattingErrors, filesWithCRLFEndings" | |
- env: | |
stepName: "API | Failure | Exclude Files Error" | |
name: ${{ env.stepName }} | |
id: error-in-exclude-files | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-files: "filesWithFormattingErrors, filesWithCRLFEndings" | |
- env: | |
stepName: "API | Failure | Exclude Option Errors" | |
name: ${{ env.stepName }} | |
id: error-in-both | |
continue-on-error: true | |
uses: ./uncrustify-formatting | |
with: | |
path: uncrustify-formatting | |
exclude-files: "filesWithFormattingErrors, filesWithCRLFEndings" | |
exclude-dirs: "filesWithFormattingErrors, | |
filesWithCRLFEndings" | |
- env: | |
stepName: Check Failure Test Cases | |
name: ${{ env.stepName }} | |
id: check-failure-test-cases | |
shell: bash | |
run: | | |
# ${{ env.stepName }} | |
exitStatus=0 | |
if [ "${{ steps.all-format-errors.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | Whitespace, CRLF, and Format Failure | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | Whitespace, CRLF, and Format Failure | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.crlf-and-format-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | CRLF and Formatting Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | CRLF and Formatting Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.crlf-and-whitespace-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | CRLF and Whitespace Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | CRLF and Whitespace Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.crlf-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | CRLF Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | CRLF Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.formatting-and-whitespace-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | Formatting and Whitespace Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | Formatting and Whitespace Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.formatting-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | Formatting Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | Formatting Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.whitespace-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | Whitespace Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | Whitespace Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.error-in-exclude-dirs.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} API | Failure | Exclude Dirs Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} API | Failure | Exclude Dirs Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.error-in-exclude-files.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} API | Failure | Exclude Files Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} API | Failure | Exclude Files Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.error-in-both.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} API | Failure | Exclude Option Errors | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} API | Failure | Exclude Option Errors | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
exit $exitStatus | |
clang-formatting-success-cases: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- env: | |
stepName: "Functional | Success | Exclude All Error Dirs" | |
name: ${{ env.stepName }} | |
id: exclude-dirs-with-errors | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "filesWithFormattingErrors,filesWithCRLFEndings,filesWithTrailingWhitespace" | |
exclude-files: "badFile.c" | |
- env: | |
stepName: "Functional | Success | Exclude Files" | |
name: ${{ env.stepName }} | |
id: exclude-files-with-errors | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: ",,," | |
exclude-files: "badFile.c,cgc_error.h,main-blinky.c,test.c" | |
- env: | |
stepName: "Functional | Success | Exclude File and Exclude Dirs" | |
name: ${{ env.stepName }} | |
id: exclude-single-dir-multiple-files | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "goodFiles" | |
exclude-files: "cgc_error.h,main-blinky.c,test.c" | |
- env: | |
stepName: "Functional | Success | Exclude Files and Exclude Dirs" | |
name: ${{ env.stepName }} | |
id: exclude-two-files-two-dirs | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "filesWithFormattingErrors,filesWithTrailingWhitespace" | |
exclude-files: "test.c,cgc_error.h,main-blinky.c,badFile.c" | |
clang-formatting-error-cases: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- env: | |
stepName: "Functional | Failure | Whitespace, CRLF, and Format Failure" | |
name: ${{ env.stepName }} | |
id: all-format-errors | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: "Functional | Failure | CRLF and Formatting Error" | |
name: ${{ env.stepName }} | |
id: crlf-and-format-error | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "filesWithTrailingWhitespace" | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: "Functional | Failure | CRLF and Whitespace Error" | |
name: ${{ env.stepName }} | |
id: crlf-and-whitespace-error | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "filesWithFormattingErrors" | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: "Functional | Failure | CRLF Error" | |
name: ${{ env.stepName }} | |
id: crlf-error | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "filesWithFormattingErrors,filesWithTrailingWhitespace" | |
exclude-files: "badFile.c" | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: "Functional | Failure | Formatting and Whitespace Error" | |
name: ${{ env.stepName }} | |
id: formatting-and-whitespace-error | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "filesWithCRLFEndings" | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: "Functional | Failure | Formatting Error" | |
name: ${{ env.stepName }} | |
id: formatting-error | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "filesWithTrailingWhitespace,filesWithCRLFEndings" | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: "Functional | Failure | Whitespace Error" | |
name: ${{ env.stepName }} | |
id: whitespace-error | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "filesWithFormattingErrors,filesWithCRLFEndings" | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: "API | Failure | Exclude Dirs Error" | |
name: ${{ env.stepName }} | |
id: error-in-exclude-dirs | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-dirs: "filesWithFormattingErrors, filesWithCRLFEndings" | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: "API | Failure | Exclude Files Error" | |
name: ${{ env.stepName }} | |
id: error-in-exclude-files | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-files: "filesWithFormattingErrors, filesWithCRLFEndings" | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: "API | Failure | Exclude Option Errors" | |
name: ${{ env.stepName }} | |
id: error-in-both | |
continue-on-error: true | |
uses: ./formatting | |
with: | |
path: formatting | |
exclude-files: "filesWithFormattingErrors, filesWithCRLFEndings" | |
exclude-dirs: "filesWithFormattingErrors, | |
filesWithCRLFEndings" | |
- name: Reset Files | |
shell: bash | |
run: git reset --hard | |
- env: | |
stepName: Check Failure Test Cases | |
name: ${{ env.stepName }} | |
id: check-failure-test-cases | |
shell: bash | |
run: | | |
# ${{ env.stepName }} | |
exitStatus=0 | |
if [ "${{ steps.all-format-errors.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | Whitespace, CRLF, and Format Failure | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | Whitespace, CRLF, and Format Failure | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.crlf-and-format-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | CRLF and Formatting Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | CRLF and Formatting Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.crlf-and-whitespace-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | CRLF and Whitespace Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | CRLF and Whitespace Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.crlf-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | CRLF Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | CRLF Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.formatting-and-whitespace-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | Formatting and Whitespace Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | Formatting and Whitespace Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.formatting-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | Formatting Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | Formatting Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.whitespace-error.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} Functional | Failure | Whitespace Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} Functional | Failure | Whitespace Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.error-in-exclude-dirs.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} API | Failure | Exclude Dirs Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} API | Failure | Exclude Dirs Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.error-in-exclude-files.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} API | Failure | Exclude Files Error | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} API | Failure | Exclude Files Error | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
if [ "${{ steps.error-in-both.outcome}}" = "failure" ]; then | |
echo -e "${{ env.bashPass }} API | Failure | Exclude Option Errors | Had Expected "failure" ${{ env.bashEnd }}" | |
else | |
echo -e "${{ env.bashFail }} API | Failure | Exclude Option Errors | Had Unexpected "success" ${{ env.bashEnd }}" | |
exitStatus=1 | |
fi | |
exit $exitStatus |