|
| 1 | +name: auth |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - 'FirebaseAuth**' |
| 7 | + - 'Firebase/Auth' # Delete after source reorg |
| 8 | + - '.github/workflows/auth.yml' |
| 9 | + - 'scripts/**' |
| 10 | + schedule: |
| 11 | + # Run every day at 11pm (PST) - cron uses UTC times |
| 12 | + - cron: '0 7 * * *' |
| 13 | + |
| 14 | +jobs: |
| 15 | + |
| 16 | + pod-lib-lint: |
| 17 | + runs-on: macOS-latest |
| 18 | + |
| 19 | + strategy: |
| 20 | + matrix: |
| 21 | + target: [ios, tvos, macos] |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - name: Setup Bundler |
| 25 | + run: scripts/setup_bundler.sh |
| 26 | + - name: Build and test |
| 27 | + run: | |
| 28 | + scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} |
| 29 | +
|
| 30 | + integration-tests: |
| 31 | + env: |
| 32 | + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} |
| 33 | + runs-on: macos-latest |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v2 |
| 36 | + - name: Setup Bundler |
| 37 | + run: scripts/setup_bundler.sh |
| 38 | + - name: Prereqs |
| 39 | + run: scripts/install_prereqs.sh Auth iOS |
| 40 | + - name: Install Secrets |
| 41 | + run: | |
| 42 | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \ |
| 43 | + Example/Auth/ApiTests/AuthCredentials.h "$plist_secret" |
| 44 | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Application.plist.gpg \ |
| 45 | + Example/Auth/Sample/Application.plist "$plist_secret" |
| 46 | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \ |
| 47 | + Example/Auth/Sample/AuthCredentials.h "$plist_secret" |
| 48 | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \ |
| 49 | + Example/Auth/Sample/GoogleService-Info.plist "$plist_secret" |
| 50 | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \ |
| 51 | + Example/Auth/Sample/GoogleService-Info_multi.plist "$plist_secret" |
| 52 | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \ |
| 53 | + Example/Auth/Sample/Sample.entitlements "$plist_secret" |
| 54 | +
|
| 55 | + - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10 |
| 56 | + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Auth iOS) |
| 57 | + |
| 58 | + catalyst: |
| 59 | + runs-on: macOS-latest |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v2 |
| 62 | + - name: Setup Bundler |
| 63 | + run: scripts/setup_bundler.sh |
| 64 | + - name: Setup project and Build for Catalyst |
| 65 | + # Only build the unit tests on Catalyst |
| 66 | + run: scripts/test_catalyst.sh FirebaseAuth build FirebaseAuth-Unit-unit |
| 67 | + |
| 68 | + quickstart: |
| 69 | + env: |
| 70 | + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} |
| 71 | + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} |
| 72 | + runs-on: macOS-latest |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v2 |
| 75 | + - name: Setup quickstart |
| 76 | + run: scripts/setup_quickstart.sh authentication |
| 77 | + - name: Install Secret GoogleService-Info.plist |
| 78 | + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \ |
| 79 | + quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret" |
| 80 | + - name: Install Secret FIREGSignInInfo.h |
| 81 | + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \ |
| 82 | + quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret" |
| 83 | + - name: Test quickstart |
| 84 | + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication) |
| 85 | + |
| 86 | + auth-cron-only: |
| 87 | + runs-on: macos-latest |
| 88 | + if: github.event_name == 'schedule' |
| 89 | + strategy: |
| 90 | + matrix: |
| 91 | + target: [ios, tvos --skip-tests, macos --skip-tests] # The macos and tvos tests can hang |
| 92 | + flags: [ |
| 93 | + '--use-modular-headers', |
| 94 | + '--use-libraries' |
| 95 | + ] |
| 96 | + needs: pod-lib-lint |
| 97 | + steps: |
| 98 | + - uses: actions/checkout@v2 |
| 99 | + - name: Setup Bundler |
| 100 | + run: scripts/setup_bundler.sh |
| 101 | + - name: PodLibLint Auth Cron |
| 102 | + run: | |
| 103 | + scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} |
| 104 | + scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} |
0 commit comments