Skip to content

Commit d645bc5

Browse files
committed
ci(*): added emulator support
1 parent 48088b8 commit d645bc5

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/test.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,24 @@ jobs:
1717
- name: Setup node
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: '18'
20+
node-version: '20'
2121
check-latest: true
2222
- name: Setup pnpm
2323
uses: pnpm/action-setup@v4
2424
with:
2525
version: latest
2626
- name: Install dependencies
2727
run: pnpm install
28-
- name: Run tests
29-
run: pnpm test
28+
- name: Install Firebase CLI
29+
run: npm i -g [email protected]
30+
- name: Start Firebase emulator and run tests
31+
run: |
32+
firebase emulators:start --only auth --project demo-test &
33+
sleep 15
34+
# Wait for emulator to be ready
35+
until wget -q --spider http://localhost:9099 2>/dev/null; do
36+
echo "Waiting for emulator to start..."
37+
sleep 2
38+
done
39+
echo "Emulator is ready, running tests..."
40+
pnpm test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@firebaseui/root",
33
"private": true,
44
"scripts": {
5-
"emulators": "firebase emulators:start --only auth",
5+
"emulators": "firebase emulators:start --only auth --project demo-test",
66
"build": "pnpm run build:translations && pnpm run build:core && pnpm run build:react",
77
"build:core": "pnpm --filter=@firebase-ui/core run build",
88
"build:translations": "pnpm --filter=@firebase-ui/translations run build",

0 commit comments

Comments
 (0)