diff --git a/.github/workflows/deploy-config.yml b/.github/workflows/deploy-config.yml index 0c3604e4704..a236784f870 100644 --- a/.github/workflows/deploy-config.yml +++ b/.github/workflows/deploy-config.yml @@ -45,3 +45,4 @@ jobs: run: yarn ts-node scripts/ci-test/deploy-if-needed.ts env: FIREBASE_CLI_TOKEN: ${{secrets.FIREBASE_CLI_TOKEN}} + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 0857860571f..fa1d9a03016 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -16,6 +16,8 @@ name: E2E Smoke Tests # Allows REST trigger. Currently triggered by release-cli script during a staging run. on: + #FIXME + pull_request: repository_dispatch: types: [staging-tests,canary-tests] diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index dd74d2437e4..5425be679f8 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -28,6 +28,7 @@ env: artifactRetentionDays: 14 # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} jobs: build: @@ -46,7 +47,7 @@ jobs: node-version: 22.10.0 - name: Test setup and yarn install run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: yarn build run: yarn build @@ -85,7 +86,7 @@ jobs: node-version: 22.10.0 - name: Test setup and yarn install run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: Set start timestamp env var run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV @@ -132,7 +133,7 @@ jobs: node-version: 22.10.0 - name: Test setup and yarn install run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: Set start timestamp env var run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV @@ -172,7 +173,7 @@ jobs: node-version: 22.10.0 - name: Test setup and yarn install run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: Set start timestamp env var run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV @@ -213,7 +214,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22.10.0 - - run: cp config/ci.config.json config/project.json + - run: echo $PROJECT_CONFIG > config/project.json - run: yarn - run: yarn build:${{ matrix.persistence }} working-directory: integration/firestore diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index b72c7cd9e2d..2063d860f86 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -61,8 +61,10 @@ jobs: with: node-version: 22.10.0 - name: Test setup and yarn install + env: + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: build run: yarn build:changed auth @@ -86,8 +88,10 @@ jobs: with: node-version: 22.10.0 - name: Test setup and yarn install + env: + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: build run: yarn build:changed auth @@ -110,8 +114,10 @@ jobs: with: node-version: 22.10.0 - name: Test setup and yarn install + env: + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn npx playwright install webkit - name: build diff --git a/.github/workflows/test-changed-fcm-integration.yml b/.github/workflows/test-changed-fcm-integration.yml index ff6023274a4..2c67a5d0c5f 100644 --- a/.github/workflows/test-changed-fcm-integration.yml +++ b/.github/workflows/test-changed-fcm-integration.yml @@ -43,8 +43,10 @@ jobs: with: node-version: 22.10.0 - name: Test setup and yarn install + env: + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: build run: yarn build:changed fcm-integration diff --git a/.github/workflows/test-changed-firestore-integration.yml b/.github/workflows/test-changed-firestore-integration.yml index 6841bdd47d6..e923a6b520f 100644 --- a/.github/workflows/test-changed-firestore-integration.yml +++ b/.github/workflows/test-changed-firestore-integration.yml @@ -46,8 +46,10 @@ jobs: uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd - name: Terraform Init if: ${{ fromJSON(env.run_terraform_steps) }} + env: + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json cd packages/firestore terraform init continue-on-error: true diff --git a/.github/workflows/test-changed-firestore.yml b/.github/workflows/test-changed-firestore.yml index 46d36059d14..0c01e9cacfa 100644 --- a/.github/workflows/test-changed-firestore.yml +++ b/.github/workflows/test-changed-firestore.yml @@ -22,6 +22,7 @@ env: artifactRetentionDays: 14 # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} jobs: build: @@ -47,7 +48,7 @@ jobs: sudo apt-get install google-chrome-stable - name: Test setup and yarn install run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: build id: build @@ -99,7 +100,7 @@ jobs: - name: Unzip build artifact run: tar xf build.tar.gz - name: Test setup and yarn install - run: cp config/ci.config.json config/project.json + run: echo $PROJECT_CONFIG > config/project.json - name: Run compat tests run: cd packages/firestore-compat && yarn run test:ci @@ -127,7 +128,7 @@ jobs: - name: Unzip build artifact run: tar xf build.tar.gz - name: Test setup and yarn install - run: cp config/ci.config.json config/project.json + run: echo $PROJECT_CONFIG > config/project.json - name: Run tests run: cd packages/firestore && yarn run ${{ matrix.test-name }} env: @@ -186,7 +187,7 @@ jobs: - name: Unzip build artifact run: tar xf build.tar.gz - name: Test setup and yarn install - run: cp config/ci.config.json config/project.json + run: echo $PROJECT_CONFIG > config/project.json - name: Run compat tests run: cd packages/firestore-compat && xvfb-run yarn run test:ci env: @@ -214,7 +215,7 @@ jobs: with: node-version: 22.10.0 - name: Test setup and yarn install - run: cp config/ci.config.json config/project.json + run: echo $PROJECT_CONFIG > config/project.json - name: Run tests run: cd packages/firestore && xvfb-run yarn run ${{ matrix.test-name }} env: @@ -239,7 +240,7 @@ jobs: run: tar xf build.tar.gz - name: Test setup run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json npx playwright install webkit - name: Run compat tests run: cd packages/firestore-compat && yarn run test:ci @@ -270,7 +271,7 @@ jobs: node-version: 22.10.0 - name: Test setup run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json npx playwright install webkit - name: Run tests run: cd packages/firestore && yarn run ${{ matrix.test-name }} diff --git a/.github/workflows/test-changed-misc.yml b/.github/workflows/test-changed-misc.yml index ebcb2d1d366..a79519a8041 100644 --- a/.github/workflows/test-changed-misc.yml +++ b/.github/workflows/test-changed-misc.yml @@ -40,8 +40,10 @@ jobs: sudo apt-get update sudo apt-get install google-chrome-stable - name: Test setup and yarn install + env: + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: build run: yarn build:changed misc diff --git a/.github/workflows/test-changed.yml b/.github/workflows/test-changed.yml index 948267aa9e7..775f7ba94ea 100644 --- a/.github/workflows/test-changed.yml +++ b/.github/workflows/test-changed.yml @@ -19,6 +19,7 @@ on: pull_request env: # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" + PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} jobs: test-chrome: @@ -41,7 +42,7 @@ jobs: sudo apt-get install google-chrome-stable - name: Test setup and yarn install run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: build run: yarn build:changed core @@ -65,7 +66,7 @@ jobs: run: npx @puppeteer/browsers install firefox@stable - name: Test setup and yarn install run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn - name: build run: yarn build:changed core @@ -90,7 +91,7 @@ jobs: node-version: 22.10.0 - name: Test setup and yarn install run: | - cp config/ci.config.json config/project.json + echo $PROJECT_CONFIG > config/project.json yarn npx playwright install webkit - name: build diff --git a/config/karma.base.js b/config/karma.base.js index c49b1246ed6..887783f6147 100644 --- a/config/karma.base.js +++ b/config/karma.base.js @@ -20,6 +20,8 @@ const path = require('path'); const webpackTestConfig = require('./webpack.test'); const { argv } = require('yargs'); +// FIXME + function determineBrowsers() { const supportedBrowsers = ['ChromeHeadless', 'WebkitHeadless', 'Firefox']; diff --git a/packages/auth/index.ts b/packages/auth/index.ts index 95e2f453f16..24ac96570b7 100644 --- a/packages/auth/index.ts +++ b/packages/auth/index.ts @@ -21,6 +21,8 @@ * limitations under the License. */ +// FIXME test + // Public types export * from './src/model/public_types'; diff --git a/scripts/ci-test/deploy-if-needed.ts b/scripts/ci-test/deploy-if-needed.ts index 854d0ca3b0c..36d4fa9adc7 100644 --- a/scripts/ci-test/deploy-if-needed.ts +++ b/scripts/ci-test/deploy-if-needed.ts @@ -22,7 +22,6 @@ import { exec } from 'child-process-promise'; const firebaseTools = require('firebase-tools'); const root = resolve(__dirname, '../..'); -const config = require(resolve(root, 'config/ci.config.json')); const git = simpleGit(root); interface DeployOptions { @@ -32,6 +31,13 @@ interface DeployOptions { only?: string; } +let config: { projectId: string }; +if (process.env.PROJECT_CONFIG) { + config = JSON.parse(process.env.PROJECT_CONFIG); + // FIXME + console.log(config); +} + /** * Changes to these files require redeployment to the project backend. */ diff --git a/test.json b/test.json new file mode 100644 index 00000000000..0d1db787684 --- /dev/null +++ b/test.json @@ -0,0 +1 @@ +$FIREBASE_CONFIG