Firebase JS SDK Nightly Angular #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Firebase JS SDK Nightly Angular | |
on: | |
schedule: | |
- cron: "0 0 * * *" # Nightly | |
pull_request: | |
branches: | |
- main | |
paths: # Only run if files in these paths change | |
- 'js-sdk-framework-tests/angular/**' | |
- '.github/workflows/js-sdk-nightly-angular.yaml' | |
- 'package.json' # Root package.json | |
- 'lerna.json' | |
- 'yarn.lock' | |
workflow_dispatch: | |
permissions: read-all | |
jobs: | |
anuglar-tests: | |
name: Angular tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Set up Node (20) | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock # Root yarn.lock | |
- name: Install Monorepo Dependencies | |
run: yarn install | |
- name: Setup Angular App | |
run: yarn setup:angular | |
- name: Build Angular App | |
run: yarn build:angular | |
- name: Run Angular tests | |
run: yarn test:angular | |
- name: Send email on failure | |
if: failure() && github.event_name == 'schedule' # Only send email for scheduled nightly runs | |
uses: ./.github/actions/send-email | |
with: | |
api-key: ${{ secrets.OSS_BOT_MAILGUN_KEY }} | |
domain: ${{ secrets.OSS_BOT_MAILGUN_DOMAIN }} | |
from: 'GitHub <admin-github@${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}>' | |
to: ${{ secrets.FIREBASE_NEXTJS_TESTS_GITHUB_EMAILS }} | |
subject: 'Nightly build of ${{github.repository}} failed!' | |
html: > | |
<b>The nightly workflow to test the Firebase JS SDK with Angular failed on: ${{github.repository}}</b> | |
<br /><br />Navigate to the | |
<a href="https://github.com/FirebaseExtended/firebase-sdk-nextjs-tests/actions/runs/${{github.run_id}}">failed workflow</a> | |
to look further into what went wrong. | |
continue-on-error: true |