From 629543eb81456aba1cd81b7dd4645f8adc74337d Mon Sep 17 00:00:00 2001 From: nicolas-f <1382241+nicolas-f@users.noreply.github.com> Date: Thu, 9 Nov 2023 16:34:45 +0100 Subject: [PATCH] ios test 2 --- .github/workflows/build.yml | 7 +++++-- .github/workflows/code_review.yml | 8 ++++++++ .github/workflows/test.yml | 7 +++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81337ca..96c2eea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,9 @@ name: Build on: workflow_call: inputs: + shouldRunKmp: + required: true + type: string shouldRunAndroid: required: true type: string @@ -12,7 +15,7 @@ on: jobs: Android: - if: ${{ inputs.shouldRunAndroid == 'true' }} + if: ${{ inputs.shouldRunKmp == 'true' || inputs.shouldRunAndroid == 'true' }} runs-on: ubuntu-latest steps: @@ -24,7 +27,7 @@ jobs: - run: ./gradlew :NoiseCapture:assemble iOS: - if: ${{ inputs.shouldRunIos == 'true' }} + if: ${{ inputs.shouldRunKmp == 'true' || inputs.shouldRunIos == 'true' }} runs-on: macos-13 timeout-minutes: 60 steps: diff --git a/.github/workflows/code_review.yml b/.github/workflows/code_review.yml index a231392..19482b8 100644 --- a/.github/workflows/code_review.yml +++ b/.github/workflows/code_review.yml @@ -23,6 +23,12 @@ jobs: run: | isFromMain=${{ github.ref == 'refs/heads/main' }} isManual=${{ github.event_name == 'workflow_dispatch' }} + hasKmpLabel=${{ contains(github.event.pull_request.labels.*.name, 'KMP') }} + shouldRunKmp=false + if $isFromMain || $isManual || $hasKmpLabel ; then + shouldRunKmp=true + fi + echo "shouldRunKmp=$shouldRunKmp" >> "$GITHUB_OUTPUT" echo "shouldRunAndroid=${{ contains(github.event.pull_request.labels.*.name, 'Android') }}" >> "$GITHUB_OUTPUT" echo "shouldRunIos=${{ contains(github.event.pull_request.labels.*.name, 'iOS') }}" >> "$GITHUB_OUTPUT" @@ -32,6 +38,7 @@ jobs: exit 1 fi outputs: + shouldRunKmp: ${{ steps.setVariables.outputs.shouldRunKmp }} shouldRunAndroid: ${{ steps.setVariables.outputs.shouldRunAndroid }} shouldRunIos: ${{ steps.setVariables.outputs.shouldRunIos }} @@ -39,6 +46,7 @@ jobs: needs: SetUp uses: ./.github/workflows/build.yml with: + shouldRunKmp: ${{ needs.SetUp.outputs.shouldRunKmp }} shouldRunAndroid: ${{ needs.SetUp.outputs.shouldRunAndroid }} shouldRunIos: ${{ needs.SetUp.outputs.shouldRunIos }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba0838e..b384aa5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,9 @@ name: Tests on: workflow_call: inputs: + shouldRunKmp: + required: true + type: string shouldRunAndroid: required: true type: string @@ -12,7 +15,7 @@ on: jobs: Android: - if: ${{ inputs.shouldRunAndroid == 'true' }} + if: ${{ inputs.shouldRunKmp == 'true' || inputs.shouldRunAndroid == 'true' }} runs-on: ubuntu-latest steps: @@ -24,7 +27,7 @@ jobs: - run: ./gradlew :NoiseCapture:cleanTestDebugUnitTest :NoiseCapture:testDebugUnitTest iOS: - if: ${{ inputs.shouldRunIos == 'true' }} + if: ${{ inputs.shouldRunKmp == 'true' || inputs.shouldRunIos == 'true' }} runs-on: macos-13 timeout-minutes: 60 steps: