Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -57,14 +57,15 @@ 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 \
-project DaysUntilBirthday.xcodeproj \
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 }}
Expand All @@ -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:
Expand All @@ -89,17 +90,15 @@ 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 \
-project AppAttestExample.xcodeproj \
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 }}
Expand All @@ -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
6 changes: 4 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand All @@ -191,8 +192,9 @@ extension DaysUntilBirthdayUITests_iOS {
return false
}

handleReturningUserSignInDisclaimerIfNeeded()
handleSignInDisclaimerIfNeeded()
handleAccessRequestIfNeeded()
handleReturningUserSignInDisclaimerIfNeeded()

return true
}
Expand Down
14 changes: 11 additions & 3 deletions Samples/Swift/DaysUntilBirthday/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <other args> 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 <other args> 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.