From cedd1e94429a998e44da35a65bc413cc19920bb1 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Mon, 11 Oct 2021 09:52:40 +0200 Subject: [PATCH] Add testing into beta workflow Only run tests on master branch. --- .env.ios | 1 + .env.mac | 1 + .github/workflows/beta.yml | 17 ++++++++++++++--- Submodules/fastlane-ci-templates | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.env.ios b/.env.ios index c878eb1a..3f584ca4 100644 --- a/.env.ios +++ b/.env.ios @@ -2,6 +2,7 @@ PLATFORM="ios" APP_ROOT="Passepartout/App/iOS" MATCH_PLATFORM="ios" GYM_SCHEME="Passepartout-iOS" +SCAN_SCHEME="PassepartoutCore-iOS" DELIVER_PLATFORM="ios" PILOT_PLATFORM="ios" APPCENTER_APP_NAME=$GYM_SCHEME diff --git a/.env.mac b/.env.mac index 4ba7b633..224facb0 100644 --- a/.env.mac +++ b/.env.mac @@ -3,6 +3,7 @@ APP_ROOT="Passepartout/App/macOS" MATCH_PLATFORM="macos" MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution" GYM_SCHEME="Passepartout-macOS" +SCAN_SCHEME="PassepartoutCore-macOS" DELIVER_PLATFORM="osx" PILOT_PLATFORM="osx" APPCENTER_APP_NAME=$GYM_SCHEME diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 61a593d3..278041b8 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -3,7 +3,8 @@ name: beta on: push: branches: - - stable + - 'master' + - 'stable' #tags: # - 'v*-b*' #tags-ignore: @@ -17,7 +18,7 @@ env: FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} jobs: - upload_to_app_store: + test_and_upload_to_app_store: runs-on: macos-10.15 timeout-minutes: 60 env: @@ -54,21 +55,30 @@ jobs: run: | scripts/ci/recognize-match-hostname.sh 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) + if: github.ref == 'refs/heads/stable' run: | bundle exec fastlane --env mac,beta create_archive - name: Build (iOS) + if: github.ref == 'refs/heads/stable' run: | bundle exec fastlane --env ios,beta create_archive - name: Upload to App Store (macOS) + if: github.ref == 'refs/heads/stable' run: | bundle exec fastlane --env mac,beta store_upload - name: Upload to App Store (iOS) + if: github.ref == 'refs/heads/stable' run: | bundle exec fastlane --env ios,beta store_upload submit_to_testflight: + if: github.ref == 'refs/heads/stable' runs-on: ubuntu-latest - needs: upload_to_app_store + needs: test_and_upload_to_app_store environment: name: testflight env: @@ -97,6 +107,7 @@ jobs: export PILOT_CHANGELOG=`ci/build-changelog.sh ios` bundle exec fastlane --env ios,beta store_beta submit_for_app_review: + if: github.ref == 'refs/heads/stable' runs-on: ubuntu-latest needs: submit_to_testflight environment: diff --git a/Submodules/fastlane-ci-templates b/Submodules/fastlane-ci-templates index cb249fbe..0fb01496 160000 --- a/Submodules/fastlane-ci-templates +++ b/Submodules/fastlane-ci-templates @@ -1 +1 @@ -Subproject commit cb249fbe38301c3f8ba63922b46fe9df36fd1893 +Subproject commit 0fb01496116811c6f25026146f3c1b4f6cc43eef