Skip to content
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

Delete .firebaserc #266

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
5 changes: 0 additions & 5 deletions .firebaserc

This file was deleted.

14 changes: 12 additions & 2 deletions .github/workflows/deploy-firebase-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
id-token: 'write'

runs-on: ubuntu-latest
env:
GOOGLE_APPLICATION_CREDENTIALS: google-application-credentials.json

environment: demo
steps:
Expand Down Expand Up @@ -56,6 +58,14 @@ jobs:
envkey_PUBLIC_FIREBASE_FUNCTIONS_REGION: ${{ vars.REGION }}
file_name: .env
- run: cd functions && pnpm run build
- name: Prepare Google Application Credentials
shell: bash
run: |
echo "${{ secrets.GCP_CREDENTIALS }}" > "google-application-credentials.json"
- run: pnpm install -g firebase-tools
- run: firebase use ${{ vars.PROJECT_ID }} --token ${{ secrets.FIREBASE_TOKEN }}
- run: firebase deploy --only functions --token ${{ secrets.FIREBASE_TOKEN }}
- run: firebase use ${{ vars.PROJECT_ID }}
- run: firebase deploy --only functions
- name: Remove credentials file
if: success() || failure()
run: |
rm google-application-credentials.json
12 changes: 12 additions & 0 deletions .github/workflows/test-firebase-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
needs: authorize
timeout-minutes: 60
runs-on: ubuntu-latest
env:
GOOGLE_APPLICATION_CREDENTIALS: google-application-credentials.json

steps:
- uses: actions/github-script@v7
id: pr
Expand Down Expand Up @@ -58,7 +61,12 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: cd functions && pnpm install --no-frozen-lockfile
- name: Prepare Google Application Credentials
shell: bash
run: |
echo "${{ secrets.GCP_CREDENTIALS }}" > "google-application-credentials.json"
- run: pnpm install -g firebase-tools
- run: firebase use ${{ vars.PROJECT_ID }}
- name: Make envfile for functions
uses: SpicyPizza/[email protected]
with:
Expand All @@ -78,3 +86,7 @@ jobs:
file_name: .env
- run: cd functions && pnpm run build
- run: cd functions && pnpm run test
- name: Remove credentials file
if: success() || failure()
run: |
rm google-application-credentials.json
12 changes: 11 additions & 1 deletion .github/workflows/vitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
PUBLIC_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
PUBLIC_FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
PUBLIC_FIREBASE_STORAGE_BUCKET: ${{secrets.FIREBASE_STORAGE_BUCKET}}
GOOGLE_APPLICATION_CREDENTIALS: google-application-credentials.json

permissions:
contents: write
Expand All @@ -43,6 +44,10 @@ jobs:
key: ${{ runner.os }}-firebase-emulators-${{ github.sha }}
restore-keys: |
${{ runner.os }}-firebase-emulators-
- name: Prepare Google Application Credentials
shell: bash
run: |
echo "${{ secrets.GCP_CREDENTIALS }}" > "google-application-credentials.json"
- uses: pnpm/action-setup@v3
with:
version: 9
Expand All @@ -51,15 +56,20 @@ jobs:
with:
node-version: 20.x
cache: "pnpm"
- run: pnpm install -g firebase-tools
- run: firebase use ${{ vars.PROJECT_ID }}
- name: "Install Dependencies"
run: pnpm i --frozen-lockfile
- name: "Install Firebase"
run: pnpm install -g firebase-tools
- name: "Test"
run: pnpm run test

- name: "Upload Coverage"
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage
- name: Remove credentials file
if: success() || failure()
run: |
rm google-application-credentials.json
Loading