Skip to content

Commit 6ff9949

Browse files
authored
InstanceID to GHA (#5691)
1 parent 65e0a98 commit 6ff9949

File tree

4 files changed

+85
-29
lines changed

4 files changed

+85
-29
lines changed

.github/workflows/database.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
paths:
99
- 'FirebaseDatabase**'
10+
- 'Firebase/Database/**'
11+
- 'Example/Database/**'
1012
- '.github/workflows/database.yml'
1113
- 'Gemfile'
1214
schedule:
@@ -97,6 +99,4 @@ jobs:
9799
- name: Setup Bundler
98100
run: scripts/setup_bundler.sh
99101
- name: PodLibLint database Cron
100-
run: |
101-
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
102-
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
102+
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}

.github/workflows/instanceid.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: instanceid
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
paths:
9+
- 'FirebaseInstanceID**'
10+
- 'Firebase/InstanceID/**'
11+
- 'Example/InstanceID/**'
12+
- '.github/workflows/instanceid.yml'
13+
- 'Gemfile'
14+
schedule:
15+
# Run every day at 11pm (PST) - cron uses UTC times
16+
- cron: '0 7 * * *'
17+
18+
jobs:
19+
pod-lib-lint:
20+
runs-on: macOS-latest
21+
env:
22+
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
23+
strategy:
24+
matrix:
25+
target: [ios, tvos, macos]
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Setup Bundler
29+
run: scripts/setup_bundler.sh
30+
- name: Install GoogleService-Info.plist
31+
run: |
32+
mkdir -p Example/InstanceID/Resources
33+
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
34+
Example/InstanceID/Resources/GoogleService-Info.plist "$plist_secret"
35+
- name: Get boolean for secrets available
36+
id: secrets
37+
run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
38+
- name: Build and test
39+
run: |
40+
export FIR_IID_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
41+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=${{ matrix.target }}
42+
43+
catalyst:
44+
runs-on: macOS-latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Setup Bundler
48+
run: scripts/setup_bundler.sh
49+
- name: Setup project and Build for Catalyst
50+
# Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
51+
run: scripts/test_catalyst.sh FirebaseInstanceID build FirebaseInstanceID-Unit-unit
52+
53+
instanceid-cron-only:
54+
runs-on: macos-latest
55+
if: github.event_name == 'schedule'
56+
env:
57+
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
58+
FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
59+
strategy:
60+
matrix:
61+
target: [ios, tvos, macos]
62+
flags: [
63+
'--use-modular-headers',
64+
'--use-libraries'
65+
]
66+
needs: pod-lib-lint
67+
steps:
68+
- uses: actions/checkout@v2
69+
- name: Setup Bundler
70+
run: scripts/setup_bundler.sh
71+
- name: Install GoogleService-Info.plist
72+
run: |
73+
mkdir -p Example/InstanceID/Resources
74+
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
75+
Example/InstanceID/Resources/GoogleService-Info.plist "$plist_secret"
76+
- name: Get boolean for secrets available
77+
id: secrets
78+
run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
79+
- name: PodLibLint InstanceID Cron
80+
run: |
81+
export FIR_IID_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
82+
FIR_IID_INTEGRATION_TESTS_REQUIRED="$plist_secret" scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}

.travis.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,6 @@ jobs:
8181
script:
8282
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=ios
8383

84-
- stage: test
85-
env:
86-
- PROJECT=InstanceID METHOD=pod-lib-lint
87-
- FIR_IID_INTEGRATION_TESTS_REQUIRED=$(if [[ "$TRAVIS_PULL_REQUEST" == "false" || "$TRAVIS_PULL_REQUEST_SLUG" == "$TRAVIS_REPO_SLUG" ]]; then echo "1"; else echo "0"; fi)
88-
before_install:
89-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
90-
script:
91-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=ios
92-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=tvos
93-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=macos
94-
9584
- stage: test
9685
osx_image: xcode10.3
9786
env:
@@ -102,21 +91,6 @@ jobs:
10291
script:
10392
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=ios
10493

105-
- stage: test
106-
if: type = cron
107-
env:
108-
- PROJECT=InstanceIDCron METHOD=pod-lib-lint
109-
- FIR_IID_INTEGRATION_TESTS_REQUIRED=$(if [[ "$TRAVIS_PULL_REQUEST" == "false" || "$TRAVIS_PULL_REQUEST_SLUG" == "$TRAVIS_REPO_SLUG" ]]; then echo "1"; else echo "0"; fi)
110-
before_install:
111-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
112-
script:
113-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=ios --use-libraries
114-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=tvos --use-libraries
115-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=macos --use-libraries
116-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=ios --use-modular-headers
117-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=tvos --use-modular-headers
118-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=macos --use-modular-headers
119-
12094
- stage: test
12195
osx_image: xcode10.3
12296
env:
Binary file not shown.

0 commit comments

Comments
 (0)