title: Run firebase emulators on github actions
body: <p>I'm trying to run my test on Github Actinos but after several attempts I was not able to do so.</p>
  
  <p>Receiving </p>
  
  <blockquote>
    <p>Error: firestore: Firestore Emulator has exited because java is not installed, you can install it from <a href="https://openjdk.java.net/install/" rel="noreferrer">https://openjdk.java.net/install/</a></p>
  </blockquote>
  
  <hr>
  
  <pre><code>  - name: Test
      uses: w9jds/firebase-action@v1.3.1
      env:
        JAVA_HOME: ${{ env.JAVA_HOME }}
        FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
        GCLOUD_PROJECT: ${{ secrets.nextGCLOUD_PROJECT }}
        PROJECT_ID: ${{ secrets.nextFIREBASE_PROJECTID }}
      with:
        args: |
          setup:emulators:firestore --debug
          firebase emulators:exec --debug --only functions,firestore \"npm run test --exit -- --forceExit --detectOpenHandles\"
  
    - name: Print debug logs
      if: failure()
      run: |
        java --version
        ls -la
        find . -type f -name "fire*-debug.log" | xargs cat
  </code></pre>
  
  <p>That's the output from action <code>name: Test</code></p>
  
  <pre><code>/usr/bin/docker run --name d38e5ad93a422d456db01475acdae41155_521526 --label 3888d3 --workdir /github/workspace --rm -e JAVA_HOME -e FIREBASE_TOKEN -e GCLOUD_PROJECT -e PROJECT_ID -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true --network github_network_2107949b3a2c43d499d641b1c2f0fd12 -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/pwa/pwa":"/github/workspace" 3888d3:8e5ad93a422d456db01475acdae41155 setup:emulators:firestore --debug
  firebase emulators:exec --debug --only functions,firestore \"npm run test --exit -- --forceExit --detectOpenHandles\"
  setting firebase project to ***
  Now using project ***
  i  firestore: downloading cloud-firestore-emulator-v1.11.4.jar... {"metadata":{"emulator":{"name":"firestore"},"message":"downloading cloud-firestore-emulator-v1.11.4.jar..."}}
  
  [2020-06-06T12:59:30.184Z] &gt; command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
  [2020-06-06T12:59:30.186Z] &gt; authorizing via FIREBASE_TOKEN environment variable
  i  emulators: Starting emulators: functions, firestore {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: functions, firestore"}}
  [2020-06-06T12:59:30.217Z] [hub] writing locator at /tmp/hub-***.json
  ✔  functions: Using node@10 from host. {"metadata":{"emulator":{"name":"functions"},"message":"Using node@10 from host."}}
  [2020-06-06T12:59:30.249Z] Ignoring unsupported arg: projectId {"metadata":{"emulator":{"name":"firestore"},"message":"Ignoring unsupported arg: projectId"}}
  [2020-06-06T12:59:30.249Z] Ignoring unsupported arg: auto_download {"metadata":{"emulator":{"name":"firestore"},"message":"Ignoring unsupported arg: auto_download"}}
  [2020-06-06T12:59:30.249Z] Starting Firestore Emulator with command {"binary":"java","args":["-Duser.language=en","-jar","/github/home/.cache/firebase/emulators/cloud-firestore-emulator-v1.11.4.jar","--host","localhost","--port",8080,"--rules","/github/workspace/firestore.rules","--functions_emulator","localhost:5001"],"optionalArgs":["port","webchannel_port","host","rules","functions_emulator","seed_from_export"],"joinArgs":false} {"metadata":{"emulator":{"name":"firestore"},"message":"Starting Firestore Emulator with command {\"binary\":\"java\",\"args\":[\"-Duser.language=en\",\"-jar\",\"/github/home/.cache/firebase/emulators/cloud-firestore-emulator-v1.11.4.jar\",\"--host\",\"localhost\",\"--port\",8080,\"--rules\",\"/github/workspace/firestore.rules\",\"--functions_emulator\",\"localhost:5001\"],\"optionalArgs\":[\"port\",\"webchannel_port\",\"host\",\"rules\",\"functions_emulator\",\"seed_from_export\"],\"joinArgs\":false}"}}
  i  firestore: Firestore Emulator logging to firestore-debug.log {"metadata":{"emulator":{"name":"firestore"},"message":"Firestore Emulator logging to \u001b[1mfirestore-debug.log\u001b[22m"}}
  
  Error: firestore: Firestore Emulator has exited because java is not installed, you can install it from https://openjdk.java.net/install/
  </code></pre>
  
  <p>That's the output from action <code>name: Print debug logs</code></p>
  
  <pre><code>[debug] [2020-06-06T12:59:27.289Z] ----------------------------------------------------------------------
  [debug] [2020-06-06T12:59:27.291Z] Command:       /usr/local/bin/node /usr/local/bin/firebase setup:emulators:firestore --debug
  [debug] [2020-06-06T12:59:27.292Z] CLI Version:   8.4.2
  [debug] [2020-06-06T12:59:27.292Z] Platform:      linux
  [debug] [2020-06-06T12:59:27.292Z] Node Version:  v10.21.0
  [debug] [2020-06-06T12:59:27.292Z] Time:          Sat Jun 06 2020 12:59:27 GMT+0000 (Coordinated Universal Time)
  [debug] [2020-06-06T12:59:27.293Z] ----------------------------------------------------------------------
  [debug] [2020-06-06T12:59:27.293Z]
  [info] i  firestore: downloading cloud-firestore-emulator-v1.11.4.jar... {"metadata":{"emulator":{"name":"firestore"},"message":"downloading cloud-firestore-emulator-v1.11.4.jar..."}}
  [debug] [2020-06-06T12:59:30.168Z] ----------------------------------------------------------------------
  [debug] [2020-06-06T12:59:30.170Z] Command:       /usr/local/bin/node /usr/local/bin/firebase emulators:exec --debug --only functions,firestore npm run test --exit -- --forceExit --detectOpenHandles
  [debug] [2020-06-06T12:59:30.171Z] CLI Version:   8.4.2
  [debug] [2020-06-06T12:59:30.171Z] Platform:      linux
  [debug] [2020-06-06T12:59:30.171Z] Node Version:  v10.21.0
  [debug] [2020-06-06T12:59:30.171Z] Time:          Sat Jun 06 2020 12:59:30 GMT+0000 (Coordinated Universal Time)
  [debug] [2020-06-06T12:59:30.171Z] ----------------------------------------------------------------------
  [debug] [2020-06-06T12:59:30.171Z]
  [debug] [2020-06-06T12:59:30.184Z] &gt; command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
  [debug] [2020-06-06T12:59:30.186Z] &gt; authorizing via FIREBASE_TOKEN environment variable
  [info] i  emulators: Starting emulators: functions, firestore {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: functions, firestore"}}
  [debug] [2020-06-06T12:59:30.217Z] [hub] writing locator at /tmp/hub-***.json
  [info] ✔  functions: Using node@10 from host. {"metadata":{"emulator":{"name":"functions"},"message":"Using node@10 from host."}}
  [debug] [2020-06-06T12:59:30.249Z] Ignoring unsupported arg: projectId {"metadata":{"emulator":{"name":"firestore"},"message":"Ignoring unsupported arg: projectId"}}
  [debug] [2020-06-06T12:59:30.249Z] Ignoring unsupported arg: auto_download {"metadata":{"emulator":{"name":"firestore"},"message":"Ignoring unsupported arg: auto_download"}}
  [debug] [2020-06-06T12:59:30.249Z] Starting Firestore Emulator with command {"binary":"java","args":["-Duser.language=en","-jar","/github/home/.cache/firebase/emulators/cloud-firestore-emulator-v1.11.4.jar","--host","localhost","--port",8080,"--rules","/github/workspace/firestore.rules","--functions_emulator","localhost:5001"],"optionalArgs":["port","webchannel_port","host","rules","functions_emulator","seed_from_export"],"joinArgs":false} {"metadata":{"emulator":{"name":"firestore"},"message":"Starting Firestore Emulator with command {\"binary\":\"java\",\"args\":[\"-Duser.language=en\",\"-jar\",\"/github/home/.cache/firebase/emulators/cloud-firestore-emulator-v1.11.4.jar\",\"--host\",\"localhost\",\"--port\",8080,\"--rules\",\"/github/workspace/firestore.rules\",\"--functions_emulator\",\"localhost:5001\"],\"optionalArgs\":[\"port\",\"webchannel_port\",\"host\",\"rules\",\"functions_emulator\",\"seed_from_export\"],\"joinArgs\":false}"}}
  [info] i  firestore: Firestore Emulator logging to firestore-debug.log {"metadata":{"emulator":{"name":"firestore"},"message":"Firestore Emulator logging to \u001b[1mfirestore-debug.log\u001b[22m"}}
  [error]
  [error] Error: firestore: Firestore Emulator has exited because java is not installed, you can install it from https://openjdk.java.net/install/
  </code></pre>
  
  <p><strong>How can I run my tests on Github Actions?</strong></p>