Add testing into beta workflow

Only run tests on master branch.
This commit is contained in:
Davide De Rosa 2021-10-11 09:52:40 +02:00
parent 28d7517497
commit cedd1e9442
4 changed files with 17 additions and 4 deletions

View File

@ -2,6 +2,7 @@ PLATFORM="ios"
APP_ROOT="Passepartout/App/iOS" APP_ROOT="Passepartout/App/iOS"
MATCH_PLATFORM="ios" MATCH_PLATFORM="ios"
GYM_SCHEME="Passepartout-iOS" GYM_SCHEME="Passepartout-iOS"
SCAN_SCHEME="PassepartoutCore-iOS"
DELIVER_PLATFORM="ios" DELIVER_PLATFORM="ios"
PILOT_PLATFORM="ios" PILOT_PLATFORM="ios"
APPCENTER_APP_NAME=$GYM_SCHEME APPCENTER_APP_NAME=$GYM_SCHEME

View File

@ -3,6 +3,7 @@ APP_ROOT="Passepartout/App/macOS"
MATCH_PLATFORM="macos" MATCH_PLATFORM="macos"
MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution" MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution"
GYM_SCHEME="Passepartout-macOS" GYM_SCHEME="Passepartout-macOS"
SCAN_SCHEME="PassepartoutCore-macOS"
DELIVER_PLATFORM="osx" DELIVER_PLATFORM="osx"
PILOT_PLATFORM="osx" PILOT_PLATFORM="osx"
APPCENTER_APP_NAME=$GYM_SCHEME APPCENTER_APP_NAME=$GYM_SCHEME

View File

@ -3,7 +3,8 @@ name: beta
on: on:
push: push:
branches: branches:
- stable - 'master'
- 'stable'
#tags: #tags:
# - 'v*-b*' # - 'v*-b*'
#tags-ignore: #tags-ignore:
@ -17,7 +18,7 @@ env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
jobs: jobs:
upload_to_app_store: test_and_upload_to_app_store:
runs-on: macos-10.15 runs-on: macos-10.15
timeout-minutes: 60 timeout-minutes: 60
env: env:
@ -54,21 +55,30 @@ jobs:
run: | run: |
scripts/ci/recognize-match-hostname.sh scripts/ci/recognize-match-hostname.sh
bundle exec fastlane preinstall_development_certs bundle exec fastlane preinstall_development_certs
- name: Run tests (macOS)
if: github.ref == 'refs/heads/master'
run: |
bundle exec fastlane --env mac test_target
- name: Build (macOS) - name: Build (macOS)
if: github.ref == 'refs/heads/stable'
run: | run: |
bundle exec fastlane --env mac,beta create_archive bundle exec fastlane --env mac,beta create_archive
- name: Build (iOS) - name: Build (iOS)
if: github.ref == 'refs/heads/stable'
run: | run: |
bundle exec fastlane --env ios,beta create_archive bundle exec fastlane --env ios,beta create_archive
- name: Upload to App Store (macOS) - name: Upload to App Store (macOS)
if: github.ref == 'refs/heads/stable'
run: | run: |
bundle exec fastlane --env mac,beta store_upload bundle exec fastlane --env mac,beta store_upload
- name: Upload to App Store (iOS) - name: Upload to App Store (iOS)
if: github.ref == 'refs/heads/stable'
run: | run: |
bundle exec fastlane --env ios,beta store_upload bundle exec fastlane --env ios,beta store_upload
submit_to_testflight: submit_to_testflight:
if: github.ref == 'refs/heads/stable'
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: upload_to_app_store needs: test_and_upload_to_app_store
environment: environment:
name: testflight name: testflight
env: env:
@ -97,6 +107,7 @@ jobs:
export PILOT_CHANGELOG=`ci/build-changelog.sh ios` export PILOT_CHANGELOG=`ci/build-changelog.sh ios`
bundle exec fastlane --env ios,beta store_beta bundle exec fastlane --env ios,beta store_beta
submit_for_app_review: submit_for_app_review:
if: github.ref == 'refs/heads/stable'
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: submit_to_testflight needs: submit_to_testflight
environment: environment:

@ -1 +1 @@
Subproject commit cb249fbe38301c3f8ba63922b46fe9df36fd1893 Subproject commit 0fb01496116811c6f25026146f3c1b4f6cc43eef