From a04970d06c3ceeeb21ccfc65719a8826f2837a45 Mon Sep 17 00:00:00 2001 From: Marceau Tonelli Date: Tue, 16 Jul 2024 14:45:43 +0200 Subject: [PATCH] Run detekt as part of code review workflow --- .github/workflows/code_review.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_review.yml b/.github/workflows/code_review.yml index e58f9b9..4ca30ea 100644 --- a/.github/workflows/code_review.yml +++ b/.github/workflows/code_review.yml @@ -10,7 +10,7 @@ on: branches: - main pull_request: - types: [opened, ready_for_review, synchronize] + types: [ opened, ready_for_review, synchronize ] branches: - main @@ -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