diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index cb26e338..4abdcaf3 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -15,10 +15,12 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest] + os: [macos-15] steps: - uses: actions/checkout@v3 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Archive for iOS run: | xcodebuild \ diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 7b303e38..ddfd3a26 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -47,7 +47,7 @@ jobs: fi swift-button-functional-test: - runs-on: macos-latest + runs-on: macos-15 needs: check-pr-body-for-key # Don't run if triggered by a PR from a fork since our Secrets won't be provided to the runner. if: ${{ needs.check-pr-body-for-key.outputs.RUN_INTEGRATION == 'yes' && !github.event.pull_request.head.repo.fork }} @@ -57,6 +57,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Build test target for Google Sign-in button for Swift run: | xcodebuild \ @@ -64,7 +66,6 @@ jobs: build-for-testing \ -scheme DaysUntilBirthday\ \(iOS\) \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' - name: Run test target for Google Sign-in button for Swift env: EMAIL_SECRET : ${{ secrets.EMAIL_SECRET }} @@ -75,12 +76,12 @@ jobs: test-without-building \ -scheme DaysUntilBirthday\ \(iOS\) \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.6' \ EMAIL_SECRET=$EMAIL_SECRET \ PASSWORD_SECRET=$PASSWORD_SECRET app-check-api-token-tests: - runs-on: macOS-13 + runs-on: macos-15 # Don't run if triggered by a PR from a fork since our Secrets won't be provided to the runner. if: "!github.event.pull_request.head.repo.fork" defaults: @@ -89,9 +90,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Use Xcode 15.0.1 - run: | - sudo xcode-select -s /Applications/Xcode_15.0.1.app + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Build test target for App Check Example run: | xcodebuild \ @@ -99,7 +99,6 @@ jobs: build-for-testing \ -scheme AppAttestExample \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15' - name: Run test target for App Check Example env: AppCheckDebugToken : ${{ secrets.APP_CHECK_DEBUG_TOKEN }} @@ -110,6 +109,6 @@ jobs: test-without-building \ -scheme AppAttestExample \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15' \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.6' \ AppCheckDebugToken=$AppCheckDebugToken \ APP_CHECK_WEB_API_KEY=$APP_CHECK_WEB_API_KEY diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 19e75f5e..ee5fd660 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -39,15 +39,17 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest] + os: [macos-15] sdk: ['macosx', 'iphonesimulator'] include: - sdk: 'macosx' destination: '"platform=OS X,arch=x86_64"' - sdk: 'iphonesimulator' - destination: '"platform=iOS Simulator,name=iPhone 15"' + destination: '"platform=iOS Simulator,name=iPhone 16,OS=18.6"' steps: - uses: actions/checkout@v3 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Build unit test target run: | xcodebuild \ diff --git a/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift b/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift index 5156e607..1c80701c 100644 --- a/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift +++ b/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift @@ -20,13 +20,13 @@ class DaysUntilBirthdayUITests_iOS: XCTestCase { private let signInStaticText = "“DaysUntilBirthday (iOS)” Wants to Use “google.com” to Sign In" private let passwordManagerPrompt = - "Would you like to save this password to use with apps and websites?" + "Save Password?" private let signInDisclaimerHeaderText = - "Sign in to Days Until Birthday" + "Sign in to DaysUntilBirthday (iOS)" private let returningUserSignInDisclaimerHeaderText = - "You’re signing back in to Days Until Birthday" - private let additionalAccessHeaderText = "Days Until Birthday wants additional access to your Google Account" - private let appTrustWarningText = "Make sure you trust Days Until Birthday" + "You’re signing back in to DaysUntilBirthday (iOS)" + private let additionalAccessHeaderText = "DaysUntilBirthday (iOS) wants additional access to your Google Account" + private let appTrustWarningText = "Make sure you trust DaysUntilBirthday (iOS)" private let chooseAnAccountHeaderText = "Choose an account" private let notNowText = "Not Now" private let timeout: TimeInterval = 30 @@ -177,6 +177,7 @@ extension DaysUntilBirthdayUITests_iOS { // Proceed through sign-in disclaimer and/or access request view(s) if needed handleSignInDisclaimerIfNeeded() handleAccessRequestIfNeeded() + handleReturningUserSignInDisclaimerIfNeeded() return true } @@ -191,8 +192,9 @@ extension DaysUntilBirthdayUITests_iOS { return false } - handleReturningUserSignInDisclaimerIfNeeded() + handleSignInDisclaimerIfNeeded() handleAccessRequestIfNeeded() + handleReturningUserSignInDisclaimerIfNeeded() return true } diff --git a/Samples/Swift/DaysUntilBirthday/README.md b/Samples/Swift/DaysUntilBirthday/README.md index 9b49509c..97147f26 100644 --- a/Samples/Swift/DaysUntilBirthday/README.md +++ b/Samples/Swift/DaysUntilBirthday/README.md @@ -35,6 +35,14 @@ The email and password that we use are defined as [secrets](https://docs.github.com/en/actions/learn-github-actions/contexts#secrets-context) on our GitHub repo, and we retrieve these from the workflow environment. -Locally, both the email and password need to be passed to `xcodebuild` as -arguments: `xcodebuild EMAIL_SECRET=... PASSWORD_SECRET=...`. -Refer to the repo's Secrets for these values. +When run locally, both the email and password need to be passed to `xcodebuild`. + +In Xcode, you can add arguments by selecting "Edit Scheme > Run > Environment Variables", and +replace the variables with your test account. Alternatively, edit `Credential.swift` directly. +WARNING: Don't check these into the repo! + +From the command line, you can do this as arguments: +`xcodebuild EMAIL_SECRET=... PASSWORD_SECRET=...`. + +For Googlers, refer to CSI internal Workflow documentation for how to access these values, or access +them via the repo's Secrets.