Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/dot-github/workflo…
Browse files Browse the repository at this point in the history
…ws/tj-actions/changed-files-41.0.0
  • Loading branch information
rlazo authored Dec 6, 2024
2 parents 6cd018e + 16485c9 commit 426f487
Show file tree
Hide file tree
Showing 1,242 changed files with 81,028 additions and 13,900 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/api-information.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 2
submodules: true
- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4.1.0
with:
java-version: 11
java-version: 17
distribution: temurin
cache: gradle
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: '3.10'
- name: Set up fireci
Expand Down
33 changes: 23 additions & 10 deletions .github/workflows/build-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,40 @@ on:

jobs:
build-artifacts:
# TODO(b/271315039) - Revert back to ubuntu when fixed
runs-on: macos-latest
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4.1.1

- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4.1.0
with:
java-version: 11
java-version: 17
distribution: temurin
cache: gradle

- name: Perform gradle build
run: |
./gradlew firebasePublish
- name: Upload generated artifacts
uses: actions/upload-artifact@v2
- name: Upload m2 repo
uses: actions/upload-artifact@v4.3.3
with:
name: release_artifacts
path: build/*.zip
name: m2repository
path: build/m2repository/
retention-days: 15

- name: Upload release notes
uses: actions/upload-artifact@v4.3.3
with:
name: release_notes
path: build/release-notes/
retention-days: 15

- name: Upload kotlindocs
uses: actions/upload-artifact@v4.3.3
with:
name: kotlindocs
path: build/firebase-kotlindoc/
retention-days: 15
12 changes: 6 additions & 6 deletions .github/workflows/build-src-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-src-check
name: Check buildSrc

on:
pull_request:
Expand All @@ -13,11 +13,11 @@ jobs:
build-src-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3.5.3
- name: Set up JDK 11
uses: actions/setup-java@v3
- uses: actions/checkout@v4.1.1
- name: Set up JDK 17
uses: actions/setup-java@v4.1.0
with:
java-version: 11
java-version: 17
distribution: temurin
cache: gradle
- name: buildSrc Tests
Expand All @@ -26,7 +26,7 @@ jobs:
run: |
./gradlew -b buildSrc/build.gradle.kts -PenablePluginTests=true check
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@b9f6c61d965bcaa18acc02d6daf706373a448f02
uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a
with:
files: "**/build/test-results/**/*.xml"
check_name: "buildSrc Test Results"
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Changelog
name: Verify changelog update

on:
pull_request
Expand All @@ -13,7 +13,7 @@ jobs:
env:
BUNDLE_GEMFILE: ./ci/danger/Gemfile
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 100
submodules: true
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/check-head-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ jobs:
check-head-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3

- uses: actions/checkout@v4.1.1
- name: Set up JDK 17
uses: actions/setup-java@v4.1.0
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Perform gradle build
run: |
./gradlew checkHeadDependencies
40 changes: 40 additions & 0 deletions .github/workflows/check-vertexai-responses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check Vertex AI Responses

on: pull_request

jobs:
check-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone mock responses
run: firebase-vertexai/update_responses.sh
- name: Find cloned and latest versions
run: |
CLONED=$(git describe --tags)
LATEST=$(git tag --sort=v:refname | tail -n1)
echo "cloned_tag=$CLONED" >> $GITHUB_ENV
echo "latest_tag=$LATEST" >> $GITHUB_ENV
working-directory: firebase-vertexai/src/test/resources/vertexai-sdk-test-data
- name: Find comment from previous run if exists
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
id: fc
with:
issue-number: ${{github.event.number}}
body-includes: Vertex AI Mock Responses Check
- name: Comment on PR if newer version is available
if: ${{env.cloned_tag != env.latest_tag && !steps.fc.outputs.comment-id}}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
issue-number: ${{github.event.number}}
body: >
### Vertex AI Mock Responses Check :warning:
A newer major version of the mock responses for Vertex AI unit tests is available.
[update_responses.sh](https://github.com/firebase/firebase-android-sdk/blob/main/firebase-vertexai/update_responses.sh)
should be updated to clone the latest version of the responses: `${{env.latest_tag}}`
- name: Delete comment when version gets updated
if: ${{env.cloned_tag == env.latest_tag && steps.fc.outputs.comment-id}}
uses: detomarco/delete-comment@850734dd44d8b15fef55b45252613b903ceb06f0
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
73 changes: 73 additions & 0 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Check Format
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- main

jobs:
determine_changed:
name: "Determine changed modules"
runs-on: ubuntu-22.04
if: (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || github.event_name == 'pull_request'
outputs:
modules: ${{ steps.changed-modules.outputs.modules }}
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 2
submodules: true

- name: Set up JDK 17
uses: actions/setup-java@v4.1.0
with:
java-version: 17
distribution: temurin
cache: gradle

- id: changed-modules
run: |
git diff --name-only HEAD~1 | xargs printf -- '--changed-git-paths %s\n' | xargs ./gradlew writeChangedProjects --output-file-path=modules.json
echo modules=$(cat modules.json) >> $GITHUB_OUTPUT
check_format:
name: "Check Format"
runs-on: ubuntu-22.04
needs:
- determine_changed
strategy:
fail-fast: false
matrix:
module: ${{ fromJSON(needs.determine_changed.outputs.modules) }}

steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 2
submodules: true

- name: Set up JDK 17
uses: actions/setup-java@v4.1.0
with:
java-version: 17
distribution: temurin
cache: gradle

- name: ${{ matrix.module }} Check Format
run: |
./gradlew ${{matrix.module}}:spotlessCheck
# A job that fails if any job in the check_format matrix fails,
# to be used as a required check for merging.
check_all:
runs-on: ubuntu-22.04
if: always()
name: Check Format (matrix)
needs: check_format
steps:
- name: Check matrix
if: needs.check_format.result != 'success'
run: exit 1
Loading

0 comments on commit 426f487

Please sign in to comment.