-
Notifications
You must be signed in to change notification settings - Fork 640
Configure Firebase AI tests to run nightly #7250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Firebase AI Nightlies | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * * # Runs automatically once a day | ||
emilypgoogle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
workflow_dispatch: # Allow triggering the workflow manually | ||
|
||
jobs: | ||
nightlies: | ||
name: "Nightlies" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need depth 2? |
||
submodules: true | ||
|
||
- name: Enable KVM | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.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@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8 | ||
with: | ||
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }} | ||
|
||
- uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need to setup gcloud? |
||
|
||
- name: Run tests | ||
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0 | ||
env: | ||
FIREBASE_CI: 1 | ||
FTL_RESULTS_BUCKET: android-ci | ||
FTL_RESULTS_DIR: ${{ 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 }} | ||
with: | ||
api-level: 31 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why 31? |
||
arch: x86_64 | ||
ram-size: 4096M | ||
heap-size: 4096M | ||
script: | | ||
adb logcat -v time > logcat.txt & | ||
./gradlew firebase-ai:connectedCheck withErrorProne -PtargetBackend="prod" | ||
|
||
- name: Upload logs | ||
if: failure() | ||
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 | ||
with: | ||
name: logcat.txt | ||
path: logcat.txt | ||
retention-days: 7 | ||
if-no-files-found: ignore | ||
Comment on lines
+10
to
+66
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't nightlies "daily release builds"? as defined in https://gradle.org/nightly/? AFAIK this is different