Skip to content

Commit

Permalink
fix: Remove mobile builds out of the template
Browse files Browse the repository at this point in the history
  • Loading branch information
toninis committed Jun 10, 2024
1 parent 54d009d commit 283aa37
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 33 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/compatibility-matrix-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,39 @@ jobs:
# }
# ]
# }
build-ios-simulator:
runs-on: macos-14-large
needs:
- update-initial-status
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ inputs.MOBILE_VERSION }}

- name: Prepare iOS Build
uses: ./.github/actions/prepare-ios-build

- name: Build iOS Simulator
env:
TAG: "${{ inputs.MOBILE_VERSION }}"
AWS_ACCESS_KEY_ID: "${{ secrets.MM_MOBILE_BETA_AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MM_MOBILE_BETA_AWS_SECRET_ACCESS_KEY }}"
GITHUB_TOKEN: "${{ secrets.MM_MOBILE_GITHUB_TOKEN }}"
run: bundle exec fastlane ios simulator --env ios.simulator
working-directory: ./fastlane

- name: Upload iOS Simulator Build
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ios-build-simulator-${{ github.run_id }}
path: Mattermost-simulator-x86_64.app.zip

detox-e2e:
name: mobile-cmt-${{ matrix.server.version }}
uses: ./.github/workflows/e2e-detox-template.yml
needs:
- update-initial-status
- build-ios-simulator
strategy:
fail-fast: false
matrix: ${{ fromJson(inputs.CMT_MATRIX) }}
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/e2e-detox-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,37 @@ jobs:
description: Detox tests for mattermost mobile app have started ...
status: pending

build-ios-simulator:
runs-on: macos-14-large
needs:
- update-initial-status
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Prepare iOS Build
uses: ./.github/actions/prepare-ios-build

- name: Build iOS Simulator
env:
TAG: "${{ github.event.pull_request.head.sha }}"
AWS_ACCESS_KEY_ID: "${{ secrets.MM_MOBILE_BETA_AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MM_MOBILE_BETA_AWS_SECRET_ACCESS_KEY }}"
GITHUB_TOKEN: "${{ secrets.MM_MOBILE_GITHUB_TOKEN }}"
run: bundle exec fastlane ios simulator --env ios.simulator
working-directory: ./fastlane

- name: Upload iOS Simulator Build
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ios-build-simulator-${{ github.run_id }}
path: Mattermost-simulator-x86_64.app.zip

run-ios-tests-on-pr:
name: iOS Mobile Tests on PR
uses: ./.github/workflows/e2e-detox-template.yml
needs:
- update-initial-status
- build-ios-simulator
with:
run-ios-tests: true
run-android-tests: false
Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/e2e-detox-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,37 @@ jobs:
description: Detox tests for mattermost mobile app have started ...
status: pending

build-ios-simulator:
runs-on: macos-14-large
needs:
- update-initial-status
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Prepare iOS Build
uses: ./.github/actions/prepare-ios-build

- name: Build iOS Simulator
env:
TAG: "${{ github.ref }}"
AWS_ACCESS_KEY_ID: "${{ secrets.MM_MOBILE_BETA_AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MM_MOBILE_BETA_AWS_SECRET_ACCESS_KEY }}"
GITHUB_TOKEN: "${{ secrets.MM_MOBILE_GITHUB_TOKEN }}"
run: bundle exec fastlane ios simulator --env ios.simulator
working-directory: ./fastlane

- name: Upload iOS Simulator Build
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ios-build-simulator-${{ github.run_id }}
path: Mattermost-simulator-x86_64.app.zip

run-ios-tests-on-release:
name: iOS Mobile Tests on Release
uses: ./.github/workflows/e2e-detox-template.yml
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-') }}
needs:
- build-ios-simulator
with:
run-ios-tests: true
run-android-tests: false
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/e2e-detox-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,37 @@ jobs:
description: Detox tests for mattermost mobile app have started ...
status: pending

build-ios-simulator:
runs-on: macos-14-large
needs:
- update-initial-status
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Prepare iOS Build
uses: ./.github/actions/prepare-ios-build

- name: Build iOS Simulator
env:
TAG: "${{ github.ref }}"
AWS_ACCESS_KEY_ID: "${{ secrets.MM_MOBILE_BETA_AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MM_MOBILE_BETA_AWS_SECRET_ACCESS_KEY }}"
GITHUB_TOKEN: "${{ secrets.MM_MOBILE_GITHUB_TOKEN }}"
run: bundle exec fastlane ios simulator --env ios.simulator
working-directory: ./fastlane

- name: Upload iOS Simulator Build
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ios-build-simulator-${{ github.run_id }}
path: Mattermost-simulator-x86_64.app.zip

run-ios-tests-on-main-scheduled:
name: iOS Mobile Tests on Main (Scheduled)
uses: ./.github/workflows/e2e-detox-template.yml
needs:
- build-ios-simulator
with:
run-ios-tests: true
run-android-tests: false
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/e2e-detox-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,35 +105,6 @@ jobs:
device_name: ${{ steps.resolve-device.outputs.DEVICE_NAME }}
device_os_version: ${{ steps.resolve-device.outputs.DEVICE_OS_VERSION }}

build-ios-simulator:
if: ${{ inputs.run-ios-tests }}
runs-on: macos-14-large
needs:
- generate-specs
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ inputs.MOBILE_VERSION }}

- name: Prepare iOS Build
uses: ./.github/actions/prepare-ios-build

- name: Build iOS Simulator
env:
TAG: "${{ needs.generate-specs.outputs.mobile_ref }}"
AWS_ACCESS_KEY_ID: "${{ secrets.MM_MOBILE_BETA_AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MM_MOBILE_BETA_AWS_SECRET_ACCESS_KEY }}"
GITHUB_TOKEN: "${{ secrets.MM_MOBILE_GITHUB_TOKEN }}"
run: bundle exec fastlane ios simulator --env ios.simulator
working-directory: ./fastlane

- name: Upload iOS Simulator Build
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ios-build-simulator-${{ github.run_id }}
path: Mattermost-simulator-x86_64.app.zip

e2e-ios:
name: ios-detox-e2e-${{ matrix.runId }}-${{ matrix.deviceName }}-${{ matrix.deviceOsVersion }}
if: ${{ inputs.run-ios-tests }}
Expand All @@ -144,7 +115,6 @@ jobs:
IOS: true
needs:
- generate-specs
- build-ios-simulator
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.generate-specs.outputs.specs) }}
Expand Down

0 comments on commit 283aa37

Please sign in to comment.