Skip to content

Commit 5820aa9

Browse files
authored
Migrate Auth CI from travis to GHA (#5308)
1 parent b90ddf1 commit 5820aa9

File tree

9 files changed

+104
-25
lines changed

9 files changed

+104
-25
lines changed

.github/workflows/auth.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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 }}

.travis.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,6 @@ jobs:
7575
# - travis_retry ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=tvos --use-modular-headers
7676
# - travis_retry ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=macos --use-modular-headers
7777

78-
- stage: test
79-
env:
80-
- PROJECT=Auth PLATFORM=iOS METHOD=xcodebuild QUICKSTART=Authentication
81-
before_install:
82-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
83-
script:
84-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=ios
85-
- travis_retry ./scripts/if_changed.sh ./scripts/test_quickstart.sh Authentication
86-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=tvos
87-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=macos
88-
- travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
89-
9078
- stage: test
9179
osx_image: xcode10.3
9280
env:
@@ -96,19 +84,6 @@ jobs:
9684
script:
9785
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=ios
9886

99-
- stage: test
100-
if: type = cron
101-
env:
102-
- PROJECT=AuthCron METHOD=pod-lib-lint
103-
script:
104-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=ios --use-libraries
105-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=tvos --use-libraries
106-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=macos --use-libraries
107-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=ios --use-modular-headers
108-
# The tvOS and macOS --use-modular-headers tests do not work on travis, perhaps because of interactive
109-
# keystore validation requirements? See https://travis-ci.org/firebase/firebase-ios-sdk/jobs/578656148
110-
# TODO(paulb777): Retry on next Xcode version update
111-
11287
- stage: test
11388
env:
11489
- PROJECT=InstanceID METHOD=pod-lib-lint
1.33 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
684 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)