Skip to content

Commit f4f6d9f

Browse files
committed
Back out "(revert me) delete existing workflows for convenience while developing"
This backs out commit 0711032.
1 parent ebd9c52 commit f4f6d9f

30 files changed

+1923
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: API Information
2+
3+
on: [ pull_request ]
4+
5+
jobs:
6+
api-information-check:
7+
if: github.event.pull_request.head.repo.full_name == github.repository
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/[email protected]
11+
with:
12+
fetch-depth: 2
13+
submodules: true
14+
- name: Set up JDK 17
15+
uses: actions/[email protected]
16+
with:
17+
java-version: 17
18+
distribution: temurin
19+
cache: gradle
20+
- name: Set up Python 3.10
21+
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
22+
with:
23+
python-version: '3.10'
24+
- name: Set up fireci
25+
run: pip3 install -e ci/fireci
26+
- name: Run api-information check
27+
run: |
28+
fireci api_information \
29+
--issue_number=${{ github.event.pull_request.number }} \
30+
--repo_name=${{ github.repository }} \
31+
--auth_token=${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build Release Artifacts
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- 'releases/**'
8+
9+
jobs:
10+
build-artifacts:
11+
runs-on: ubuntu-latest
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
steps:
15+
- uses: actions/[email protected]
16+
17+
- name: Set up JDK 17
18+
uses: actions/[email protected]
19+
with:
20+
java-version: 17
21+
distribution: temurin
22+
cache: gradle
23+
24+
- name: Perform gradle build
25+
run: |
26+
./gradlew firebasePublish
27+
28+
- name: Upload m2 repo
29+
uses: actions/[email protected]
30+
with:
31+
name: m2repository
32+
path: build/m2repository/
33+
retention-days: 15
34+
35+
- name: Upload release notes
36+
uses: actions/[email protected]
37+
with:
38+
name: release_notes
39+
path: build/release-notes/
40+
retention-days: 15
41+
42+
- name: Upload kotlindocs
43+
uses: actions/[email protected]
44+
with:
45+
name: kotlindocs
46+
path: build/firebase-kotlindoc/
47+
retention-days: 15

.github/workflows/changelog.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Verify changelog update
2+
3+
on:
4+
pull_request
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
changelog-check:
12+
runs-on: ubuntu-22.04
13+
env:
14+
BUNDLE_GEMFILE: ./ci/danger/Gemfile
15+
steps:
16+
- uses: actions/[email protected]
17+
with:
18+
fetch-depth: 100
19+
submodules: true
20+
- uses: ruby/setup-ruby@v1
21+
with:
22+
ruby-version: '2.7'
23+
- name: Setup Bundler
24+
run: ./ci/danger/setup_bundler.sh
25+
- name: Danger CHANGELOG verifier
26+
env:
27+
DANGER_GITHUB_API_TOKEN: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
28+
run:
29+
'[ ! -z $DANGER_GITHUB_API_TOKEN ] && bundle exec danger --dangerfile=./ci/danger/Dangerfile || echo "Skipping Danger for External Contributor"'
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Check Head Dependencies
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- 'releases/**'
8+
9+
jobs:
10+
check-head-dependencies:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/[email protected]
14+
- name: Set up JDK 17
15+
uses: actions/[email protected]
16+
with:
17+
java-version: 17
18+
distribution: temurin
19+
cache: gradle
20+
- name: Perform gradle build
21+
run: |
22+
./gradlew checkHeadDependencies
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Check Vertex AI Responses
2+
3+
on: pull_request
4+
5+
jobs:
6+
check-version:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Clone mock responses
11+
run: firebase-vertexai/update_responses.sh
12+
- name: Find cloned and latest versions
13+
run: |
14+
CLONED=$(git describe --tags)
15+
LATEST=$(git tag --sort=v:refname | tail -n1)
16+
echo "cloned_tag=$CLONED" >> $GITHUB_ENV
17+
echo "latest_tag=$LATEST" >> $GITHUB_ENV
18+
working-directory: firebase-vertexai/src/test/resources/vertexai-sdk-test-data
19+
- name: Find comment from previous run if exists
20+
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
21+
id: fc
22+
with:
23+
issue-number: ${{github.event.number}}
24+
body-includes: Vertex AI Mock Responses Check
25+
- name: Comment on PR if newer version is available
26+
if: ${{env.cloned_tag != env.latest_tag && !steps.fc.outputs.comment-id}}
27+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
28+
with:
29+
issue-number: ${{github.event.number}}
30+
body: >
31+
### Vertex AI Mock Responses Check :warning:
32+
33+
A newer major version of the mock responses for Vertex AI unit tests is available.
34+
[update_responses.sh](https://github.com/firebase/firebase-android-sdk/blob/main/firebase-vertexai/update_responses.sh)
35+
should be updated to clone the latest version of the responses: `${{env.latest_tag}}`
36+
- name: Delete comment when version gets updated
37+
if: ${{env.cloned_tag == env.latest_tag && steps.fc.outputs.comment-id}}
38+
uses: detomarco/delete-comment@850734dd44d8b15fef55b45252613b903ceb06f0
39+
with:
40+
comment-id: ${{ steps.fc.outputs.comment-id }}

.github/workflows/check_format.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Check Format
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
4+
cancel-in-progress: true
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
determine_changed:
13+
name: "Determine changed modules"
14+
runs-on: ubuntu-22.04
15+
if: (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || github.event_name == 'pull_request'
16+
outputs:
17+
modules: ${{ steps.changed-modules.outputs.modules }}
18+
steps:
19+
- uses: actions/[email protected]
20+
with:
21+
fetch-depth: 2
22+
submodules: true
23+
24+
- name: Set up JDK 17
25+
uses: actions/[email protected]
26+
with:
27+
java-version: 17
28+
distribution: temurin
29+
cache: gradle
30+
31+
- id: changed-modules
32+
run: |
33+
git diff --name-only HEAD~1 | xargs printf -- '--changed-git-paths %s\n' | xargs ./gradlew writeChangedProjects --output-file-path=modules.json
34+
echo modules=$(cat modules.json) >> $GITHUB_OUTPUT
35+
36+
check_format:
37+
name: "Check Format"
38+
runs-on: ubuntu-22.04
39+
needs:
40+
- determine_changed
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
module: ${{ fromJSON(needs.determine_changed.outputs.modules) }}
45+
46+
steps:
47+
- uses: actions/[email protected]
48+
with:
49+
fetch-depth: 2
50+
submodules: true
51+
52+
- name: Set up JDK 17
53+
uses: actions/[email protected]
54+
with:
55+
java-version: 17
56+
distribution: temurin
57+
cache: gradle
58+
59+
- name: ${{ matrix.module }} Check Format
60+
run: |
61+
./gradlew ${{matrix.module}}:spotlessCheck
62+
63+
# A job that fails if any job in the check_format matrix fails,
64+
# to be used as a required check for merging.
65+
check_all:
66+
runs-on: ubuntu-22.04
67+
if: always()
68+
name: Check Format (matrix)
69+
needs: check_format
70+
steps:
71+
- name: Check matrix
72+
if: needs.check_format.result != 'success'
73+
run: exit 1

0 commit comments

Comments
 (0)