Przeglądaj źródła

Update sample readme for integration testing

Matthew Mathias 4 lat temu
rodzic
commit
a8314032ae
1 zmienionych plików z 23 dodań i 1 usunięć
  1. 23 1
      Samples/Swift/DaysUntilBirthday/README.md

+ 23 - 1
Samples/Swift/DaysUntilBirthday/README.md

@@ -24,5 +24,27 @@ open DaysUntilBirthdayForPod.xcworkspace
 ```
 open DaysUntilBirthday.xcodeproj
 ```
-
 2. Run the `DaysUntilBirthday (iOS)` or `DaysUntilBirthday (macOS)` target.
+
+## Integration Tests
+
+We run integration tests on the `DaysUntilBirthday(iOS)` sample app.
+These tests attempt to login via Google Sign-in, and so they need an email and
+a password.
+The email and password that we use are located in `Credentials.xcconfig`.
+
+We create this file during a workflow step on PR push by retrieving these values
+from [GitHub's Secret's context](https://docs.github.com/en/actions/learn-github-actions/contexts#secrets-context).
+
+Locally, both email and password are retrived from a `Credentials.xcconfig`
+configuration file that is not checked into the repo.
+You will need to create an `Credentials.xcconfig` at this path:
+`Samples/Swift/DaysUntilBirthday/DaysUnilBirthdayUITests(iOS)/Credentials.xcconfig`.
+It will need values for `EMAIL_SECRET` and `PASSWORD_SECRET`:
+
+```
+EMAIL_SECRET = ...
+PASSWORD_SECRET = ...
+```
+
+Refer to the repo's Secrets for the values to add to this configuration file.