Skip to content

chore: upgrade nock to v14 and fix api-request unit tests #5287

chore: upgrade nock to v14 and fix api-request unit tests

chore: upgrade nock to v14 and fix api-request unit tests #5287

Workflow file for this run

name: Continuous Integration
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, 24.x, 26.x]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ matrix.node-version }}
# Java 21 is required by firebase-tools to run emulator-based integration tests
- name: Set up Java
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '21'
- name: Install and build
run: |
npm ci
npm run build
npm run build:tests
- name: Lint and run unit tests
run: npm test
- name: Run api-extractor
run: npm run api-extractor
- name: Run emulator-based integration tests
run: |
npm install -g firebase-tools@15.17.0
firebase emulators:exec --project fake-project-id --only auth,database,firestore \
'npx mocha test/integration/auth.spec.ts test/integration/database.spec.ts test/integration/firestore.spec.ts --slow 5000 --timeout 20000 --require ts-node/register'