From 89d8b1f67e91593edb14a522b949a6f68e1efb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 8 Sep 2024 19:10:27 +0200 Subject: [PATCH] Skip result check on error --- .github/workflows/test.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4e7af9c..729884c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,8 +35,6 @@ jobs: cp ../SwiftLintPlugins/.github/workflows/Package.swift . echo "let myVar = 0 as! Int" > Sources/main.swift echo "included: [Sources]" > .swiftlint.yml - - name: Build project and check findings - run: swift build 2>&1 | grep -q "Force Cast Violation" - name: Let build fail id: failed_build run: swift build @@ -44,11 +42,6 @@ jobs: - name: Check that build failed if: ${{ steps.failed_build.outcome != 'failure' }} run: exit 1 - - name: Verify command plugin - run: | - swift package swiftlint --version - swift package swiftlint --help - swift package swiftlint 2>&1 | grep -q "Force Cast Violation" - name: Let command fail id: failed_command run: swift package swiftlint @@ -56,8 +49,6 @@ jobs: - name: Check that command failed if: ${{ steps.failed_command.outcome != 'failure' }} run: exit 1 - - name: Verify Xcode plugin - run: xcodebuild -scheme SwiftLintPluginsTest -destination 'platform=macOS' build 2>&1 | grep -q "Force Cast Violation" - name: Let Xcode build fail id: failed_xcode_build run: xcodebuild -scheme SwiftLintPluginsTest -destination 'platform=macOS' build @@ -70,6 +61,6 @@ jobs: echo "force_cast: warning" > .swiftlint.yml - name: Check that all commands pass run: | - swift build - swift package swiftlint - xcodebuild -scheme SwiftLintPluginsTest -destination 'platform=macOS' build + swift build | grep -q "Force Cast Violation" + swift package swiftlint | grep -q "Force Cast Violation" + xcodebuild -scheme SwiftLintPluginsTest -destination 'platform=macOS' build | grep -q "Force Cast Violation"