Skip to content

Commit a8ec3bf

Browse files
authored
Start GitHub Actions (#4431)
1 parent b6cd99e commit a8ec3bf

File tree

2 files changed

+49
-8
lines changed

2 files changed

+49
-8
lines changed

.github/workflows/actions.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
check:
7+
runs-on: macOS-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Check
11+
run: |
12+
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e3496d9/Formula/clang-format.rb
13+
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7963c3d/Formula/swiftformat.rb
14+
pip install flake8
15+
./scripts/check.sh --test-only
16+
17+
core:
18+
needs: check
19+
runs-on: macOS-latest
20+
steps:
21+
- uses: actions/checkout@v1
22+
- name: Set up
23+
run: |
24+
bundle install
25+
bundle exec pod --version
26+
- name: FirebaseCore
27+
run: ./scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=ios
28+
29+
dynamiclinks:
30+
needs: check
31+
runs-on: macOS-latest
32+
steps:
33+
- uses: actions/checkout@v1
34+
- name: Set up
35+
run: |
36+
bundle install
37+
bundle exec pod --version
38+
- name: FirebaseDynamicLinks
39+
run: ./scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec

scripts/check.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,16 @@ fi
246246

247247
# If there are changes to the Firestore project, ensure they're ordered
248248
# correctly to minimize conflicts.
249-
if ! git diff --quiet "${START_SHA}" -- Firestore; then
250-
sync_project_cmd=("${top_dir}/scripts/sync_project.rb")
251-
if [[ "${TEST_ONLY}" == true ]]; then
252-
sync_project_cmd+=(--test-only)
253-
fi
254-
"${sync_project_cmd[@]}"
255-
if ! git diff --quiet; then
256-
maybe_commit "sync_project.rb generated changes"
249+
if [ -z "${GITHUB_WORKFLOW-}" ]; then
250+
if ! git diff --quiet "${START_SHA}" -- Firestore; then
251+
sync_project_cmd=("${top_dir}/scripts/sync_project.rb")
252+
if [[ "${TEST_ONLY}" == true ]]; then
253+
sync_project_cmd+=(--test-only)
254+
fi
255+
"${sync_project_cmd[@]}"
256+
if ! git diff --quiet; then
257+
maybe_commit "sync_project.rb generated changes"
258+
fi
257259
fi
258260
fi
259261

0 commit comments

Comments
 (0)