Skip to content

Commit

Permalink
Skip result check on error
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplyDanny committed Sep 8, 2024
1 parent b97754b commit 89d8b1f
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,20 @@ 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
continue-on-error: true
- 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
continue-on-error: true
- 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
Expand All @@ -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"

0 comments on commit 89d8b1f

Please sign in to comment.