Delete .firebaserc #391
This file contains 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
name: "Test" | |
on: | |
push: | |
branches: ["remove-firebaserc"] | |
pull_request_target: | |
branches: [main] | |
jobs: | |
authorize: | |
environment: | |
${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }} | |
runs-on: ubuntu-latest | |
steps: | |
- run: true | |
test: | |
needs: authorize | |
runs-on: ubuntu-latest | |
env: | |
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 | |
steps: | |
#- uses: actions/github-script@v7 | |
# id: pr | |
# with: | |
# script: | | |
# const { data: pullRequest } = await github.rest.pulls.get({ | |
# ...context.repo, | |
# pull_number: context.payload.pull_request.number, | |
# }); | |
# return pullRequest | |
- uses: actions/checkout@v4 | |
# with: | |
# ref: ${{fromJSON(steps.pr.outputs.result).merge_commit_sha}} | |
- name: Cache firebase emulators | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/firebase/emulators | |
key: ${{ runner.os }}-firebase-emulators-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-firebase-emulators- | |
- name: Google Auth | |
id: auth | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | |
- name: Prepare Google Application Credentials | |
shell: bash | |
run: | | |
echo "${{ secrets.GCP_CREDENTIALS }}" > "google-application-credentials.json" | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- name: "Install Node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: "pnpm" | |
- run: pnpm install -g firebase-tools | |
- run: firebase use ${{ vars.PROJECT_ID }} --debug | |
- 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 |