|
1 | 1 | # firebase-emulator-action |
2 | 2 |
|
3 | | -An action which starts the Firebase Emulator Suite. |
| 3 | +An action which starts the Firebase Emulator Suite. |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | +Prerequisites for this action: |
| 8 | + |
| 9 | +- Node.js |
| 10 | +- Java |
| 11 | + |
| 12 | +To use the action, use the `firebase-emulator-action` action: |
| 13 | + |
| 14 | +```yaml |
| 15 | +steps: |
| 16 | + # Ensure Node.js is installed (See https://github.com/actions/setup-node) |
| 17 | + - name: Setup Node.js |
| 18 | + uses: actions/setup-node@v4 |
| 19 | + with: |
| 20 | + node-version: 20 |
| 21 | + |
| 22 | + # Ensure Java is installed (See https://github.com/actions/setup-java) |
| 23 | + - name: Setup Java |
| 24 | + uses: actions/setup-java@v4 |
| 25 | + with: |
| 26 | + distribution: 'temurin' |
| 27 | + java-version: '17' |
| 28 | + |
| 29 | + # Install the Firebase Emulator Suite |
| 30 | + - name: Start Firebase Emulator Suite |
| 31 | + uses: firebase-emulator-action@v1 |
| 32 | + with: |
| 33 | + # The version of the Firebase CLI to install, (`npm install -g firebase-tools@${firebase-tools-version}`) |
| 34 | + firebase-tools-version: 'latest' |
| 35 | + |
| 36 | + # A comma separated list of emulators to start. |
| 37 | + emulators: 'auth,firestore,functions,storage,database' |
| 38 | + |
| 39 | + # The project ID to use, defaults to 'test-project'. |
| 40 | + project-id: 'test-project' |
| 41 | + |
| 42 | + # The maximum number of retries to attempt before failing the action, defaults to 3. |
| 43 | + max-retries: '3' |
| 44 | + |
| 45 | + # The maximum number of checks to perform before failing the retry, defaults to 60. |
| 46 | + max-checks: '60' |
| 47 | + |
| 48 | + # The time to wait between checks in seconds, defaults to 1. |
| 49 | + wait-time: '1' |
| 50 | + |
| 51 | + # The port to check for the emulators, defaults to 9099 (Cloud Firestore). Change this if you are using specific emulators. See https://firebase.google.com/docs/emulator-suite/install_and_configure#port_configuration. |
| 52 | + check-port: '9099' |
| 53 | +``` |
0 commit comments