Skip to content

Commit

Permalink
CI/CD: run iOS integration tests in matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivard committed Nov 8, 2024
1 parent cf185ed commit 4a67d87
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/status-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ jobs:
with:
name: integration-test-ios
path: ./fastlane/build/*.zip
- name: Dynamically generate matrix for running integration tests
# This oneliner gets every test zip generated by Fastlane and writes this as output to GitHub. This is used for the matrix in the integration-test-ios job below.
run: echo "::set-output name=matrix::$(for file in $(ls ./fastlane/build/*.zip); do basename "$file"; done | jq -R . | jq -s .)"
build-integration-test-android:
runs-on: ubuntu-latest
needs: build-irmagobridge-android
Expand All @@ -211,7 +214,10 @@ jobs:
needs:
- build-integration-test-ios
- unit-test # To prevent that test resources are used when we already know there is an issue.
concurrency: integration-test-ios # To prevent that we use too much test resources at the same time.
strategy:
matrix:
file_name: ${{ fromJson(needs.build-integration-test-ios.outputs.matrix) }}
concurrency: integration-test-ios-${{ matrix.file_name }} # To prevent that we use too much test resources at the same time.
steps:
- name: Download test artifacts
uses: actions/download-artifact@v4
Expand All @@ -227,15 +233,11 @@ jobs:
run: gcloud config set project yivimobile
- name: Run integration tests for each zip file
run: |
for zip_file in *.zip; do
echo "Running integration test for $zip_file"
gcloud firebase test ios run \
--test $zip_file \
--timeout 20m \
--device=model=iphone8,orientation=portrait \
--device=model=iphone8,orientation=landscape &
done
wait
gcloud firebase test ios run \
--test ${{ matrix.file_name }} \
--timeout 7m \
--device=model=iphone8,orientation=portrait \
--device=model=iphone8,orientation=landscape
integration-test-android:
runs-on: ubuntu-latest
container: google/cloud-sdk:latest
Expand Down

0 comments on commit 4a67d87

Please sign in to comment.