diff --git a/.github/workflows/api-information.yml b/.github/workflows/api-information.yml new file mode 100644 index 00000000000..cf2d37da5da --- /dev/null +++ b/.github/workflows/api-information.yml @@ -0,0 +1,31 @@ +name: API Information + +on: [ pull_request ] + +jobs: + api-information-check: + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + 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: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Set up fireci + run: pip3 install -e ci/fireci + - name: Run api-information check + run: | + fireci api_information \ + --issue_number=${{ github.event.pull_request.number }} \ + --repo_name=${{ github.repository }} \ + --auth_token=${{ secrets.GOOGLE_OSS_BOT_TOKEN }} diff --git a/.github/workflows/build-release-artifacts.yml b/.github/workflows/build-release-artifacts.yml new file mode 100644 index 00000000000..90928ed494f --- /dev/null +++ b/.github/workflows/build-release-artifacts.yml @@ -0,0 +1,33 @@ +name: Build Release Artifacts + +on: + workflow_dispatch: + pull_request: + branches: + - 'releases/**' + +jobs: + build-artifacts: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - 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 firebasePublish + + - name: Upload generated artifacts + uses: actions/upload-artifact@v4.3.3 + with: + name: release_artifacts + path: build/*.zip + retention-days: 15 diff --git a/.github/workflows/build-src-check.yml b/.github/workflows/build-src-check.yml new file mode 100644 index 00000000000..98aed0d6649 --- /dev/null +++ b/.github/workflows/build-src-check.yml @@ -0,0 +1,32 @@ +name: build-src-check + +on: + pull_request: + paths: + - 'buildSrc/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build-src-check: + runs-on: ubuntu-22.04 + steps: + - 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: buildSrc Tests + env: + FIREBASE_CI: 1 + run: | + ./gradlew -b buildSrc/build.gradle.kts -PenablePluginTests=true check + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@b9f6c61d965bcaa18acc02d6daf706373a448f02 + with: + files: "**/build/test-results/**/*.xml" + check_name: "buildSrc Test Results" diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 00000000000..ddf50fb93f7 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,29 @@ +name: Changelog + +on: + pull_request + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + changelog-check: + runs-on: ubuntu-22.04 + env: + BUNDLE_GEMFILE: ./ci/danger/Gemfile + steps: + - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 100 + submodules: true + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.7' + - name: Setup Bundler + run: ./ci/danger/setup_bundler.sh + - name: Danger CHANGELOG verifier + env: + DANGER_GITHUB_API_TOKEN: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }} + run: + '[ ! -z $DANGER_GITHUB_API_TOKEN ] && bundle exec danger --dangerfile=./ci/danger/Dangerfile || echo "Skipping Danger for External Contributor"' diff --git a/.github/workflows/check-head-dependencies.yml b/.github/workflows/check-head-dependencies.yml new file mode 100644 index 00000000000..088724bf1d4 --- /dev/null +++ b/.github/workflows/check-head-dependencies.yml @@ -0,0 +1,22 @@ +name: Check Head Dependencies + +on: + workflow_dispatch: + pull_request: + branches: + - 'releases/**' + +jobs: + check-head-dependencies: + runs-on: ubuntu-latest + steps: + - 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 diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml new file mode 100644 index 00000000000..beb12d0a5bf --- /dev/null +++ b/.github/workflows/ci_tests.yml @@ -0,0 +1,275 @@ +name: CI Tests +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true +on: + pull_request: + push: + branches: + - master + +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 + + unit_tests: + name: "Unit Tests" + 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: Add google-services.json + env: + INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }} + run: | + echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > google-services.json + + - name: ${{ matrix.module }} Unit Tests + env: + FIREBASE_CI: 1 + run: | + ./gradlew ${{matrix.module}}:check withErrorProne + - name: Compute upload file name + run: | + MODULE=${{matrix.module}} + echo "ARTIFACT_NAME=${MODULE//:/_}" >> $GITHUB_ENV + - name: Upload Test Results + uses: actions/upload-artifact@v4.3.3 + if: always() + with: + name: unit-test-result-${{env.ARTIFACT_NAME}} + path: "**/build/test-results/**/*.xml" + retention-days: 7 + if-no-files-found: ignore + + # A job that fails if any job in the unit_tests matrix fails, + # to be used as a required check for merging. + check_all: + runs-on: ubuntu-22.04 + if: always() + name: Unit Tests (matrix) + needs: unit_tests + steps: + - name: Check test matrix + if: needs.unit_tests.result != 'success' + run: exit 1 + + + integ_tests: + name: "Instrumentation Tests" + # only run on post submit or PRs not originating from forks. + if: (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + 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: Add google-services.json + env: + INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }} + run: | + echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > google-services.json + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }} + - uses: google-github-actions/setup-gcloud@v2 + - name: ${{ matrix.module }} Integ Tests + env: + FIREBASE_CI: 1 + FTL_RESULTS_BUCKET: android-ci + FTL_RESULTS_DIR: ${{ github.event_name == 'pull_request' && format('pr-logs/pull/{0}/{1}/{2}/{3}_{4}/artifacts/', github.repository, github.event.pull_request.number, github.job, github.run_id, github.run_attempt) || format('logs/{0}/{1}_{2}/artifacts/', github.workflow, github.run_id, github.run_attempt)}} + FIREBASE_APP_CHECK_DEBUG_SECRET: ${{ secrets.FIREBASE_APP_CHECK_DEBUG_SECRET }} + run: | + ./gradlew ${{matrix.module}}:deviceCheck withErrorProne -PtargetBackend="prod" + + firestore_custom_integ_tests: + name: "Firestore Custom Instrumentation Tests Against Named DB" + runs-on: ubuntu-22.04 + needs: + - determine_changed + # only run on post submit or PRs not originating from forks. + if: ((github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && contains(fromJSON(needs.determine_changed.outputs.modules), ':firebase-firestore') + strategy: + fail-fast: false + + 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: Add google-services.json + env: + INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }} + run: | + echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > google-services.json + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }} + - uses: google-github-actions/setup-gcloud@v2 + + # create composite indexes with Terraform + - name: Setup Terraform + uses: hashicorp/setup-terraform@v2 + - name: Terraform Init + run: | + cd firebase-firestore + terraform init + continue-on-error: true + - name: Terraform Apply + if: github.event_name == 'pull_request' + run: | + cd firebase-firestore + + # Define a temporary file, redirect both stdout and stderr to the file + output_file=$(mktemp) + if ! terraform apply -var-file=../google-services.json -auto-approve > "$output_file" 2>&1 ; then + cat "$output_file" + if cat "$output_file" | grep -q "index already exists"; then + echo "===================================================================================" + echo -e "\e[93m\e[1mTerraform apply failed due to index already exists; We can safely ignore this error.\e[0m" + echo "===================================================================================" + fi + exit 1 + fi + rm -f "$output_file" + continue-on-error: true + + - name: Firestore Named DB Integ Tests + env: + FIREBASE_CI: 1 + FTL_RESULTS_BUCKET: android-ci + FTL_RESULTS_DIR: ${{ github.event_name == 'pull_request' && format('pr-logs/pull/{0}/{1}/{2}/{3}_{4}/artifacts/', github.repository, github.event.pull_request.number, github.job, github.run_id, github.run_attempt) || format('logs/{0}/{1}_{2}/artifacts/', github.workflow, github.run_id, github.run_attempt)}} + FIREBASE_APP_CHECK_DEBUG_SECRET: ${{ secrets.FIREBASE_APP_CHECK_DEBUG_SECRET }} + run: | + ./gradlew firebase-firestore:deviceCheck withErrorProne -PtargetBackend="prod" -PtargetDatabaseId="test-db" + + + firestore_nightly_integ_tests: + name: "Firestore Instrumentation Tests Against Nightly Environment" + runs-on: ubuntu-22.04 + needs: + - determine_changed + # only run on post submit or PRs not originating from forks. + if: ((github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && contains(fromJSON(needs.determine_changed.outputs.modules), ':firebase-firestore') + strategy: + fail-fast: false + + 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: Add google-services.json + env: + INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.NIGHTLY_INTEG_TESTS_GOOGLE_SERVICES }} + run: | + echo $INTEG_TESTS_GOOGLE_SERVICES > google-services.json + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }} + - uses: google-github-actions/setup-gcloud@v2 + + - name: Firestore Nightly Integ Tests + env: + FIREBASE_CI: 1 + FTL_RESULTS_BUCKET: android-ci + FTL_RESULTS_DIR: ${{ github.event_name == 'pull_request' && format('pr-logs/pull/{0}/{1}/{2}/{3}_{4}/artifacts/', github.repository, github.event.pull_request.number, github.job, github.run_id, github.run_attempt) || format('logs/{0}/{1}_{2}/artifacts/', github.workflow, github.run_id, github.run_attempt)}} + FIREBASE_APP_CHECK_DEBUG_SECRET: ${{ secrets.FIREBASE_APP_CHECK_DEBUG_SECRET }} + run: | + ./gradlew firebase-firestore:deviceCheck withErrorProne -PtargetBackend="nightly" + + + publish-test-results: + name: "Publish Tests Results" + needs: + - unit_tests + runs-on: ubuntu-22.04 + + permissions: + checks: write + + # only needed unless run with comment_mode: off + pull-requests: write + + if: always() + + steps: + - name: Download Artifacts + uses: actions/download-artifact@v4.1.5 + with: + path: artifacts + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + with: + files: "artifacts/**/*.xml" diff --git a/.github/workflows/config-e2e.yml b/.github/workflows/config-e2e.yml new file mode 100644 index 00000000000..604115b324d --- /dev/null +++ b/.github/workflows/config-e2e.yml @@ -0,0 +1,42 @@ +name: Firebase Remote Config E2E Tests + +on: + schedule: + - cron: 24 */4 * * * # every 4 hours @ 24 minutes past the hour + workflow_dispatch: # allow triggering the workflow manually + +concurrency: + group: ${{ github.workflow }} + +env: + REMOTE_CONFIG_E2E_GOOGLE_SERVICES: ${{ secrets.REMOTE_CONFIG_E2E_GOOGLE_SERVICES }} + +jobs: + test: + + runs-on: ubuntu-latest + + steps: + - name: Checkout firebase-config + 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: Add google-services.json + run: | + echo $REMOTE_CONFIG_E2E_GOOGLE_SERVICES | base64 -d > google-services.json + + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_service_account }} + - uses: google-github-actions/setup-gcloud@v2 + - name: Run Remote Config end-to-end tests + env: + FTL_RESULTS_BUCKET: fireescape + run: | + ./gradlew :firebase-config:test-app:deviceCheck withErrorProne -PtargetBackend="prod" diff --git a/.github/workflows/copyright-check.yml b/.github/workflows/copyright-check.yml new file mode 100644 index 00000000000..dd17b2acd4f --- /dev/null +++ b/.github/workflows/copyright-check.yml @@ -0,0 +1,27 @@ +name: Copyright check + +on: pull_request + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + copyright-check: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4.1.1 + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + - run: | + pip install -e "ci/fireci" + - run: | + fireci copyright_check \ + -e py \ + -e gradle \ + -e java \ + -e kt \ + -e groovy \ + -e sh \ + -e proto diff --git a/.github/workflows/create_releases.yml b/.github/workflows/create_releases.yml new file mode 100644 index 00000000000..3d3c654683e --- /dev/null +++ b/.github/workflows/create_releases.yml @@ -0,0 +1,50 @@ +name: Create release + +on: + workflow_dispatch: + inputs: + name: + description: 'Release name' + required: true + type: string + past-name: + description: 'Past release name' + required: true + type: string + +jobs: + create-branches: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Create base branch + uses: peterjgrainger/action-create-branch@c2800a3a9edbba2218da6861fa46496cf8f3195a + with: + branch: 'releases/${{ inputs.name }}' + + create-pull-request: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v4.1.0 + with: + java-version: 17 + distribution: temurin + cache: gradle + - name: Create release configuration template + run: | + ./gradlew generateReleaseConfig -PcurrentRelease=${{ inputs.name }} -PpastRelease=${{ inputs.past-name }} -PprintOutput=true + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + base: 'releases/${{ inputs.name }}' + branch: 'releases/${{ inputs.name }}.release' + add-paths: release.json,release_report.md,release_report.json + title: '${{ inputs.name}} release' + body: 'Auto-generated PR for release ${{ inputs.name}}' + commit-message: 'Create release config for ${{ inputs.name }}' diff --git a/.github/workflows/diff-javadoc.yml b/.github/workflows/diff-javadoc.yml new file mode 100644 index 00000000000..17fb370d0bf --- /dev/null +++ b/.github/workflows/diff-javadoc.yml @@ -0,0 +1,64 @@ +name: Diff Javadoc + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Make diff directory + run: mkdir ~/diff + + - name: Checkout PR branch + 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: Generate docs for PR branch + run: ./gradlew kotlindoc + + - name: Move branch docs to diff directory + run: mv build ~/diff/modified + + - name: Checkout master + uses: actions/checkout@v4.1.1 + with: + ref: ${{ github.base_ref }} + + - name: Generate docs for Master + run: ./gradlew kotlindoc + + - name: Move master docs to diff directory + run: mv build ~/diff/original + + - name: Get diff between Master and Branch docs + run: > + `# Recursively diff directories, including new files, git style, with 3 lines of context` + diff -wEburN ~/diff/original ~/diff/modified + `# Remove the first line and new file signifier of the output` + | tail -n +2 + `# Replace the diff new file signifier with the end and start of a new codeblock` + | sed "s/^diff.*$/\`\`\`\\n\`\`\`diff/g" + `# Add a collapsable block, summary, and start the first code block on the first line` + | sed "1s/^/
\\nJavadoc Changes:<\/summary>\\n\\n\`\`\`diff\\n/" + `# Close the final code block and close the collapsable on the final line` + | sed "$ s/$/\\n\`\`\`\\n<\/details>/" + `# Write to diff.md for later` + > diff.md + + - name: Add comment + continue-on-error: true + uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1 + with: + message-path: diff.md diff --git a/.github/workflows/fireci.yml b/.github/workflows/fireci.yml new file mode 100644 index 00000000000..2181236e2a8 --- /dev/null +++ b/.github/workflows/fireci.yml @@ -0,0 +1,27 @@ +name: fireci + +on: + pull_request: + paths: + - 'ci/**' + - '.github/workflows/fireci.yml' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + fireci: + name: "fireci tests" + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4.1.1 + - uses: actions/setup-python@v2 + with: + python-version: '3.8' + - run: | + pip install -e "ci/fireci[test]" + - run: | + pytest ci/fireci + - run: | + mypy --config-file ci/fireci/setup.cfg ci/fireci/ diff --git a/.github/workflows/fireperf-e2e.yml b/.github/workflows/fireperf-e2e.yml new file mode 100644 index 00000000000..d1e09f1e2d7 --- /dev/null +++ b/.github/workflows/fireperf-e2e.yml @@ -0,0 +1,107 @@ +name: FirePerf E2E Tests + +on: + schedule: + - cron: 4 */4 * * * # every 4 hours at 04 minutes past the hour + workflow_dispatch: # allow triggering the workflow manually + +concurrency: + group: ${{ github.workflow }} + +env: + PERF_E2E_GOOGLE_SERVICES: ${{ secrets.PERF_E2E_GOOGLE_SERVICES }} + FTL_RESULTS_BUCKET: fireescape + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + environment: [ prod, autopush ] + steps: + - name: Checkout firebase-android-sdk + uses: actions/checkout@v4.1.1 + - name: Checkout firebase-android-buildtools + uses: actions/checkout@v4.1.1 + with: + repository: FirebasePrivate/firebase-android-buildtools + token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }} + path: firebase-android-buildtools + - name: Set up JDK 17 + uses: actions/setup-java@v4.1.0 + with: + java-version: 17 + distribution: temurin + cache: gradle + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Set up fireci + run: pip3 install -e ci/fireci + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }} + - uses: google-github-actions/setup-gcloud@v2 + - name: Add google-services.json + run: echo $PERF_E2E_GOOGLE_SERVICES | base64 -d > google-services.json + - name: Run fireperf end-to-end tests + run: | + fireci fireperf_e2e_test \ + --plugin_repo_dir=firebase-android-buildtools \ + --target_environment=${{ matrix.environment }} + - name: Notify developers upon failures + if: ${{ failure() }} + uses: actions/github-script@v6 + with: + script: | + const owner = context.repo.owner; + const repo = context.repo.repo; + const commit = context.sha; + const run = context.runId; + const url = `https://github.com/${owner}/${repo}/actions/runs/${run}`; + + const datetime = (new Date()).toLocaleString('en-US', { + timeZone: 'America/Los_Angeles', + dateStyle: 'medium', + timeStyle: 'long', + }); + + const text = + `Failed on commit ${commit} at ${datetime}. + + ${url}`; + + const { data: issues } = await github.rest.issues.listForRepo({ + owner: owner, + repo: repo, + state: 'open', + labels: 'fireperf-e2e-tests' + }); + + if (issues.length) { + github.rest.issues.createComment({ + owner: owner, + repo: repo, + issue_number: issues[0].number, + body: text, + }); + } else { + github.rest.issues.create({ + owner: owner, + repo: repo, + title: 'FirePerf E2E Test Failures', + body: text, + labels: ['fireperf-e2e-tests'], + assignees: ['raymondlam', 'visumickey'] + }); + } + - name: Upload test artifacts + if: always() + uses: actions/upload-artifact@v4.3.3 + with: + name: test-artifacts (${{ matrix.environment }}) + path: | + ~/.m2/repository/com/google/firebase/perf-plugin + **/build/reports + **/build/test-results diff --git a/.github/workflows/health-metrics.yml b/.github/workflows/health-metrics.yml new file mode 100644 index 00000000000..a47c682ae61 --- /dev/null +++ b/.github/workflows/health-metrics.yml @@ -0,0 +1,134 @@ +name: Health Metrics + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +on: + pull_request: + push: + branches: + - master + # add other feature branches here + # TODO(yifany): support workflow_dispatch for metric tests (or only for startup time test) + +env: + GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + +jobs: + coverage: + name: Coverage + if: | + (github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk') + || (github.event_name == 'pull_request' + && github.event.pull_request.head.repo.full_name == github.repository) + runs-on: ubuntu-latest + 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: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - uses: google-github-actions/auth@v2 + with: + credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + - uses: google-github-actions/setup-gcloud@v2 + - name: Set up fireci + run: pip3 install -e ci/fireci + - name: Run coverage tests (presubmit) + if: ${{ github.event_name == 'pull_request' }} + run: fireci coverage --pull-request + - name: Run coverage tests (post-submit) + if: ${{ github.event_name == 'push' }} + run: fireci coverage + + size: + name: Size + if: | + (github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk') + || (github.event_name == 'pull_request' + && github.event.pull_request.head.repo.full_name == github.repository) + runs-on: ubuntu-latest + 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: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - uses: google-github-actions/auth@v2 + with: + credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + - uses: google-github-actions/setup-gcloud@v2 + - name: Set up fireci + run: pip3 install -e ci/fireci + - name: Run size tests (presubmit) + if: ${{ github.event_name == 'pull_request' }} + run: fireci binary_size --pull-request + - name: Run size tests (post-submit) + if: ${{ github.event_name == 'push' }} + run: fireci binary_size + + startup_time: + name: Startup Time + if: | + (github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk') + || (github.event_name == 'pull_request' + && github.event.pull_request.head.repo.full_name == github.repository + && github.event.pull_request.base.ref == 'master') + runs-on: ubuntu-latest + 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: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - uses: google-github-actions/auth@v2 + with: + credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + - uses: google-github-actions/setup-gcloud@v2 + - name: Set up fireci + run: pip3 install -e ci/fireci + - name: Add google-services.json + env: + INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }} + BENCHMARK_APP_LOCATION: health-metrics/benchmark/template/app/google-services.json + run: | + echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > $BENCHMARK_APP_LOCATION + - name: Run startup-time tests (presubmit) + if: ${{ github.event_name == 'pull_request' }} + run: | + git diff --name-only HEAD~1 | \ + xargs printf -- '--changed-git-paths %s\n' | \ + xargs ./gradlew writeChangedProjects --output-file-path=modules.json + fireci macrobenchmark ci --pull-request --changed-modules-file modules.json + - name: Run startup-time tests (post-submit) + if: ${{ github.event_name == 'push' }} + run: | + fireci macrobenchmark ci --push diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml new file mode 100644 index 00000000000..2a6bd787e0d --- /dev/null +++ b/.github/workflows/jekyll-gh-pages.yml @@ -0,0 +1,55 @@ +name: Jekyll with GitHub Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + paths: + - '.github/workflows/jekyll-gh-pages.yml' + - 'contributor-docs/**' + pull_request: + paths: + - '.github/workflows/jekyll-gh-pages.yml' + - 'contributor-docs/**' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./contributor-docs + destination: ./_site + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + + deploy: + if: ${{ github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk' }} + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/.github/workflows/make-bom.yml b/.github/workflows/make-bom.yml new file mode 100644 index 00000000000..2678455add3 --- /dev/null +++ b/.github/workflows/make-bom.yml @@ -0,0 +1,39 @@ +name: Make BoM + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - 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: Build + run: | + ./ci/run.sh \ + --artifact-target-dir=./logs/artifacts \ + --artifact-patterns=bom.zip \ + --artifact-patterns=bomReleaseNotes.md \ + --artifact-patterns=recipeVersionUpdate.txt \ + gradle \ + -- \ + --build-cache \ + buildBomZip + + - name: Upload generated artifacts + uses: actions/upload-artifact@v4.3.3 + with: + name: artifacts + path: ./logs/artifacts/ + retention-days: 5 diff --git a/.github/workflows/merge-to-main.yml b/.github/workflows/merge-to-main.yml new file mode 100644 index 00000000000..70b03e29b61 --- /dev/null +++ b/.github/workflows/merge-to-main.yml @@ -0,0 +1,30 @@ +name: Merge to main + +on: + pull_request: + branches: + - master + types: + - opened + - labeled + - unlabeled + +jobs: + pr-message: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1 + with: + message: > + ### 📝 PRs merging into main branch + + **Our main branch should always be in a releasable state**. + If you are working on a larger change, or if you don't want + this change to see the light of the day just yet, consider + using a feature branch first, and only merge into the main + branch when the code complete and ready to be released. + + - name: Success + run: exit 0 diff --git a/.github/workflows/post_release_cleanup.yml b/.github/workflows/post_release_cleanup.yml new file mode 100644 index 00000000000..fb6d7dc8f96 --- /dev/null +++ b/.github/workflows/post_release_cleanup.yml @@ -0,0 +1,43 @@ +name: Post release cleanup + +on: + workflow_dispatch: + inputs: + name: + description: 'Release name' + required: true + type: string + +jobs: + create-pull-request: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v4.1.0 + with: + java-version: 17 + distribution: temurin + cache: gradle + - name: Run post release cleanup task + run: | + ./gradlew postReleaseCleanup + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + base: 'master' + branch: 'releases/${{ inputs.name }}.mergeback' + add-paths: | + **/CHANGELOG.md + **/gradle.properties + **/*.gradle + **/*.gradle.kts + title: '${{ inputs.name}} mergeback' + body: | + Auto-generated PR for cleaning up release ${{ inputs.name}} + + NO_RELEASE_CHANGE + commit-message: 'Post release cleanup for ${{ inputs.name }}' diff --git a/.github/workflows/private-mirror-sync.yml b/.github/workflows/private-mirror-sync.yml new file mode 100644 index 00000000000..9bb2ca13a0b --- /dev/null +++ b/.github/workflows/private-mirror-sync.yml @@ -0,0 +1,25 @@ +name: Private Mirror Sync + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +on: + push: + branches: + - master + +jobs: + sync: + if: github.repository == 'firebase/firebase-android-sdk' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 + submodules: true + token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }} + - name: Force push HEAD to private repo main branch + run: | + git remote add mirror https://github.com/FirebasePrivate/firebase-android-sdk.git + git push mirror HEAD:main --force --verbose diff --git a/.github/workflows/release-note-changes.yml b/.github/workflows/release-note-changes.yml new file mode 100644 index 00000000000..2ef318e9809 --- /dev/null +++ b/.github/workflows/release-note-changes.yml @@ -0,0 +1,67 @@ +name: Release note changes + +on: + pull_request: + branches: + - 'master' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 + + - name: Create output file + run: touch changelog_comment.md + + - name: Get changed changelog files + id: changed-files + uses: tj-actions/changed-files@v36.0.10 + with: + files_ignore: | + buildSrc/** + files: | + **/CHANGELOG.md + + - name: Set up JDK 17 + uses: actions/setup-java@v4.1.0 + with: + java-version: 17 + distribution: temurin + cache: gradle + + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + if: ${{ steps.changed-files.outputs.any_changed == 'true' }} + with: + python-version: '3.10' + + - name: Set up fireci + id: install-fireci + if: ${{ steps.changed-files.outputs.any_changed == 'true' }} + run: pip3 install -e ci/fireci + + - name: Generate comment + id: generate-comment + if: ${{ steps.install-fireci.outcome == 'success' }} + run: | + fireci changelog_comment -c "${{ steps.changed-files.outputs.all_changed_files }}" -o ./changelog_comment.md + + - name: Add PR Comment + uses: mshick/add-pr-comment@v2.8.1 + continue-on-error: true + with: + status: ${{ steps.generate-comment.outcome }} + message-path: ./changelog_comment.md + message-skipped: | + ## Release note changes + No release note changes were detected. If you made changes that should be + present in the next release, ensure you've added an entry in the appropriate + `CHANGELOG.md` file(s). + message-failure: | + ## Release note changes + A `CHANGELOG.md` file seems to not match the expected format. + Please ensure your changelog files are following the format as + defined in [our documentation](#). diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml new file mode 100644 index 00000000000..130ac90b22e --- /dev/null +++ b/.github/workflows/scorecards.yml @@ -0,0 +1,72 @@ +# This workflow uses actions that are not certified by GitHub. They are provided +# by a third-party and are governed by separate terms of service, privacy +# policy, and support documentation. + +name: Scorecards supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '45 11 * * 1' + push: + branches: [ "master" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecards analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + # Uncomment the permissions below if installing in a private repository. + # contents: read + # actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@v4.1.1 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecards on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@v4.3.3 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@807578363a7869ca324a79039e6db9c843e0e100 # v2.1.27 + with: + sarif_file: results.sarif diff --git a/.github/workflows/semver-check.yml b/.github/workflows/semver-check.yml new file mode 100644 index 00000000000..2fc7eb38843 --- /dev/null +++ b/.github/workflows/semver-check.yml @@ -0,0 +1,22 @@ +name: Semver Check + +on: + workflow_dispatch: + pull_request: + branches: + - 'releases/**' + +jobs: + semver-check: + runs-on: ubuntu-latest + steps: + - 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 semverCheckForRelease diff --git a/.github/workflows/sessions-e2e.yml b/.github/workflows/sessions-e2e.yml new file mode 100644 index 00000000000..048cd92eee9 --- /dev/null +++ b/.github/workflows/sessions-e2e.yml @@ -0,0 +1,42 @@ +name: Firebase Sessions E2E Tests + +on: + schedule: + - cron: 24 */4 * * * # every 4 hours at 24 minutes past the hour + workflow_dispatch: # allow triggering the workflow manually + +concurrency: + group: ${{ github.workflow }} + +env: + SESSIONS_E2E_GOOGLE_SERVICES: ${{ secrets.SESSIONS_E2E_GOOGLE_SERVICES }} + +jobs: + test: + + runs-on: ubuntu-latest + + steps: + - name: Checkout firebase-sessions + uses: actions/checkout@v4.1.1 + + - name: set up JDK 17 + uses: actions/setup-java@v4.1.0 + with: + java-version: '11' + distribution: 'temurin' + cache: gradle + + - name: Add google-services.json + run: | + echo $SESSIONS_E2E_GOOGLE_SERVICES | base64 -d > google-services.json + + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }} + - uses: google-github-actions/setup-gcloud@v2 + - name: Run sessions end-to-end tests + env: + FTL_RESULTS_BUCKET: fireescape + run: | + ./gradlew :firebase-sessions:test-app:deviceCheck withErrorProne -PtargetBackend="prod" -PtriggerCrashes diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml new file mode 100644 index 00000000000..07ab7dbeeb2 --- /dev/null +++ b/.github/workflows/smoke-tests.yml @@ -0,0 +1,60 @@ +name: Smoke Tests + +on: [ pull_request ] + +jobs: + smoke-tests: + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + 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 + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }} + - uses: google-github-actions/setup-gcloud@v2 + + # TODO(yifany): make it a fireci plugin and remove the separately distributed jar file + - name: Download smoke tests runner + run: | + SMOKE_TESTS_RUNNER_URL="https://storage.googleapis.com/android-ci/smoke-tests-runner.jar" + curl ${SMOKE_TESTS_RUNNER_URL} --output runner.jar + + # TODO(yifany): remove hardcoded reference to /smoke-tests-google-services from the runner + - name: Add google-services.json + env: + SMOKE_TESTS_GOOGLE_SERVICES: ${{ secrets.SMOKE_TESTS_GOOGLE_SERVICES }} + run: | + echo $SMOKE_TESTS_GOOGLE_SERVICES | base64 -d > google-services.json + sudo mkdir /smoke-tests-google-services + sudo mv google-services.json /smoke-tests-google-services + + # TODO(yifany): remove hardcoded reference to Prow environment variables from the runner + - name: Run smoke tests + env: + FIREBASE_CI: 1 + REPO_OWNER: ${{ github.repository_owner }} + REPO_NAME: firebase-android-sdk + PULL_NUMBER: ${{ github.event.pull_request.number }} + JOB_NAME: smoke-tests + BUILD_ID: ${{ github.run_id }} + ARTIFACTS: ${{ runner.temp }} + run: java -jar runner.jar smoke-tests/runner.config + + - name: Upload test artifacts + if: always() + uses: actions/upload-artifact@v4.3.3 + with: + name: smoke-tests-artifacts + path: | + ${{ runner.temp }}/**/*.apk + ${{ runner.temp }}/**/changed-artifacts.json + ${{ runner.temp }}/**/smoke-test-dependencies.log diff --git a/.github/workflows/update-cpp-sdk-on-release.yml b/.github/workflows/update-cpp-sdk-on-release.yml new file mode 100644 index 00000000000..40dbbad5d1d --- /dev/null +++ b/.github/workflows/update-cpp-sdk-on-release.yml @@ -0,0 +1,75 @@ +# Whenever a new Firebase Android SDK is released, this workflow triggers +# *another* workflow on the Firebase C++ SDK, which will check for the Android +# version update and create a PR updating its dependencies if any version +# numbers changed. +name: update-cpp-sdk-on-release +on: + push: + branches: + # Change the below line if the main branch is renamed. + - 'master' + paths: + # Only run this if a gradle.properties file is touched. + - '**/gradle.properties' + +jobs: + check_if_version_changed: + name: Check if released version changed + # This step checks several things, and sets released_version_changed=1 only if all are true: + # - The push must target the main branch. + # - The push must modify a gradle.properties file. + # - The push must change a "latestReleasedVersion=" line in a gradle.properties file. + runs-on: ubuntu-latest + outputs: + released_version_changed: ${{ steps.check_version.outputs.released_version_changed }} + steps: + - uses: actions/checkout@v4.1.1 + with: + # Check out the actual head commit, not any merge commit. + ref: ${{ github.sha }} + # Specify fetch-depth so we can query the log, the default is a shallow clone. + fetch-depth: 0 + - name: Check if version was updated in git history + id: check_version + run: | + # Query the git history for all gradle.properties files changed by this push. + # Then, check the diff to see if any "latestReleasedVersion=" lines changed. + if (git diff '${{ github.event.before }}' -- '**/gradle.properties' | grep -q '^[-+]latestReleasedVersion='); then + echo "released_version_changed=1" >> $GITHUB_OUTPUT + else + echo "No change to latestReleasedVersion detected since ${{ github.event.before }}" + fi + + trigger_cpp_sdk_update: + name: Trigger C++ SDK update + # If the previous step set the released_version_changed output param to 1, then + # we should trigger the C++ SDK to update its Android dependencies. + needs: check_if_version_changed + if: ${{ needs.check_if_version_changed.outputs.released_version_changed }} + # Fetch an authentication token for firebase-workflow-trigger, then use that + # token to trigger the update-dependencies workflow in firebase-cpp-sdk. + runs-on: ubuntu-latest + steps: + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Check out firebase-cpp-sdk + uses: actions/checkout@v4.1.1 + with: + repository: firebase/firebase-cpp-sdk + ref: main + + - name: Get firebase-workflow-trigger token + uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c + id: generate-token + with: + app_id: ${{ secrets.CPP_WORKFLOW_TRIGGER_APP_ID }} + private_key: ${{ secrets.CPP_WORKFLOW_TRIGGER_APP_PRIVATE_KEY }} + repository: firebase/firebase-cpp-sdk + + - name: Trigger firebase-cpp-sdk update + run: | + pip install -r scripts/gha/python_requirements.txt + python scripts/gha/trigger_workflow.py -t ${{ steps.generate-token.outputs.token }} -w update-dependencies.yml -p updateAndroid 1 -p updateiOS 0 -p comment "[Triggered]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) by [firebase-android-sdk $(date '+%b %d') release]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/${{ github.sha }})." -s 10 -A diff --git a/.github/workflows/validate-dependencies.yml b/.github/workflows/validate-dependencies.yml new file mode 100644 index 00000000000..c91ad8aee0c --- /dev/null +++ b/.github/workflows/validate-dependencies.yml @@ -0,0 +1,22 @@ +name: Validate Artifact Dependencies + +on: + workflow_dispatch: + pull_request: + branches: + - 'releases/**' + +jobs: + build-artifacts: + runs-on: ubuntu-latest + steps: + - 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 validatePomForRelease diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml new file mode 100644 index 00000000000..f5f285e29a0 --- /dev/null +++ b/.github/workflows/version-check.yml @@ -0,0 +1,22 @@ +name: Version Check + +on: + workflow_dispatch: + pull_request: + branches: + - 'releases/**' + +jobs: + version-check: + runs-on: ubuntu-latest + steps: + - 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: Build + run: | + ./gradlew gmavenVersionCheck diff --git a/.gitignore b/.gitignore index afeb384ada6..d76e10d3c80 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,13 @@ _artifacts .DS_Store firebase-crashlytics-ndk/.externalNativeBuild/ firebase-crashlytics-ndk/.cxx/ +smoke-test-logs/ +smoke-tests/build-debug-headGit-smoke-test +smoke-tests/firehorn.log +macrobenchmark-output.json + +# generated Terraform docs +.terraform/* +.terraform.lock.hcl +*.tfstate +*.tfstate.* \ No newline at end of file diff --git a/.idea/copyright/Apache_2___Google.xml b/.idea/copyright/Apache_2___Google.xml deleted file mode 100644 index 39ebd9250d1..00000000000 --- a/.idea/copyright/Apache_2___Google.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index 0d00e324732..00000000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/FirestoreProdIntegrationTest.xml b/.idea/runConfigurations/FirestoreProdIntegrationTest.xml deleted file mode 100644 index fda38c03059..00000000000 --- a/.idea/runConfigurations/FirestoreProdIntegrationTest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Firestore_Integration_Tests__Firestore_Emulator_.xml b/.idea/runConfigurations/Firestore_Integration_Tests__Firestore_Emulator_.xml deleted file mode 100644 index c8fdb6918e1..00000000000 --- a/.idea/runConfigurations/Firestore_Integration_Tests__Firestore_Emulator_.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Firestore_Unit_Tests.xml b/.idea/runConfigurations/Firestore_Unit_Tests.xml deleted file mode 100644 index b465aefdc39..00000000000 --- a/.idea/runConfigurations/Firestore_Unit_Tests.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - -