Skip to content

Commit

Permalink
Run detekt as part of code review workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tonelli-m committed Jul 16, 2024
1 parent 5455cdf commit a04970d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/code_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches:
- main
pull_request:
types: [opened, ready_for_review, synchronize]
types: [ opened, ready_for_review, synchronize ]
branches:
- main

Expand Down Expand Up @@ -50,16 +50,21 @@ jobs:
shouldRunAndroid: ${{ needs.SetUp.outputs.shouldRunAndroid }}
shouldRunIos: ${{ needs.SetUp.outputs.shouldRunIos }}

Detekt:
uses: ./.github/workflows/lint.yml

AllowMerge:
if: always()
runs-on: ubuntu-latest
needs: [ UnitTests ]
needs: [ UnitTests, Detekt ]
steps:
- run: |
if [ ${{ github.event_name }} == pull_request ] && [ ${{ join(github.event.pull_request.labels.*.name) == '' }} == true ]; then
exit 1
elif [ ${{ (contains(needs.UnitTests.result, 'failure')) }} == true ]; then
exit 1
elif [ ${{ (contains(needs.Detekt.result, 'failure')) }} == true ]; then
exit 1
else
exit 0
fi

0 comments on commit a04970d

Please sign in to comment.