Skip to content

Commit

Permalink
ios test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Nov 9, 2023
1 parent 82ca457 commit 629543e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build
on:
workflow_call:
inputs:
shouldRunKmp:
required: true
type: string
shouldRunAndroid:
required: true
type: string
Expand All @@ -12,7 +15,7 @@ on:

jobs:
Android:
if: ${{ inputs.shouldRunAndroid == 'true' }}
if: ${{ inputs.shouldRunKmp == 'true' || inputs.shouldRunAndroid == 'true' }}
runs-on: ubuntu-latest

steps:
Expand All @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/code_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -32,13 +38,15 @@ jobs:
exit 1
fi
outputs:
shouldRunKmp: ${{ steps.setVariables.outputs.shouldRunKmp }}
shouldRunAndroid: ${{ steps.setVariables.outputs.shouldRunAndroid }}
shouldRunIos: ${{ steps.setVariables.outputs.shouldRunIos }}

Build:
needs: SetUp
uses: ./.github/workflows/build.yml
with:
shouldRunKmp: ${{ needs.SetUp.outputs.shouldRunKmp }}
shouldRunAndroid: ${{ needs.SetUp.outputs.shouldRunAndroid }}
shouldRunIos: ${{ needs.SetUp.outputs.shouldRunIos }}

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Tests
on:
workflow_call:
inputs:
shouldRunKmp:
required: true
type: string
shouldRunAndroid:
required: true
type: string
Expand All @@ -12,7 +15,7 @@ on:

jobs:
Android:
if: ${{ inputs.shouldRunAndroid == 'true' }}
if: ${{ inputs.shouldRunKmp == 'true' || inputs.shouldRunAndroid == 'true' }}
runs-on: ubuntu-latest

steps:
Expand All @@ -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:
Expand Down

0 comments on commit 629543e

Please sign in to comment.