refactor: remove BookReadingContentStreamPanel and related functionality #16974
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created | |
| # For more information see: https://github.com/actions/setup-java#publishing-using-gradle | |
| name: doughnut CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| ARTIFACT: "doughnut" | |
| VERSION: "0.0.1-SNAPSHOT" | |
| GCS_BUCKET: "dough-01" | |
| # Public SPA + CLI only; LB backend bucket must point here (see docs/gcp/prod-frontend-static-lb.md). | |
| GCS_FRONTEND_BUCKET: "dough-frontend-01" | |
| MYSQL_UT_DB: "doughnut_test" | |
| MYSQL_E2E_DB: "doughnut_e2e_test" | |
| MYSQL_DB_USER: ${{ secrets.DBUSER }} | |
| MYSQL_DB_PASSWORD: ${{ secrets.DBPASSWORD }} | |
| REDIS_VERSION: "8.4" | |
| MYSQL_VERSION: "8.4" | |
| REDIS_PORT: "6380" | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | |
| GITHUB_FOR_ISSUES_API_TOKEN: ${{ secrets.GH_ISSUES_API_TOKEN }} | |
| OPENAI_API_TOKEN: ${{ secrets.OPENAI_API_TOKEN }} | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} | |
| GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} | |
| jobs: | |
| Lint-N-Backend-Generated-Types-For-Frontend: | |
| name: Linting & Types Gen for Frontend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check for @focus tags in e2e test feature files | |
| run: ./scripts/check_focus_tags.sh | |
| - uses: ./.github/setup_jdk_with_cache | |
| with: | |
| java_version: ${{ vars.JAVA_VERSION }} | |
| - uses: ./.github/setup_nodejs_with_cache | |
| with: | |
| node_version: ${{ vars.NODE_VERSION }} | |
| pnpm_version: ${{ vars.PNPM_VERSION }} | |
| - run: bash -c ./assert_generated_type_script_up_to_date.sh | |
| - run: pnpm lint:all | |
| Backend-unit-tests: | |
| name: Backend Unit tests | |
| runs-on: ${{ vars.RUNNER }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup MySQL DB Server | |
| uses: ./.github/mysql_db | |
| with: | |
| mysql_version: ${{ env.MYSQL_VERSION }} | |
| mysql_db_host_port: ${{ vars.MYSQL_PORT }} | |
| mysql_db_container_port: ${{ vars.MYSQL_PORT }} | |
| mysql_db_instance: ${{ env.MYSQL_UT_DB }} | |
| mysql_db_user: ${{ env.MYSQL_DB_USER }} | |
| mysql_db_password: ${{ env.MYSQL_DB_PASSWORD }} | |
| - name: Setup Redis DB Server | |
| uses: ./.github/redis_db | |
| with: | |
| redis_version: ${{ vars.REDIS_VERSION || env.REDIS_VERSION }} | |
| redis_port: ${{ vars.REDIS_PORT || env.REDIS_PORT }} | |
| - uses: ./.github/setup_jdk_with_cache | |
| with: | |
| java_version: ${{ vars.JAVA_VERSION }} | |
| - run: backend/gradlew -p backend migrateTestDB -Dspring.profiles.active=test | |
| - run: backend/gradlew -p backend test -Dspring.profiles.active=test --parallel | |
| - uses: ./.github/setup_nodejs_with_cache | |
| with: | |
| node_version: ${{ vars.NODE_VERSION }} | |
| pnpm_version: ${{ vars.PNPM_VERSION }} | |
| - name: Boot jar reproducibility (phase 1) | |
| env: | |
| GOOGLE_CLIENT_ID: ${{ env.GOOGLE_CLIENT_ID }} | |
| GOOGLE_CLIENT_SECRET: ${{ env.GOOGLE_CLIENT_SECRET }} | |
| run: | | |
| pnpm bundle:all | |
| backend/gradlew -p backend build -x test -Dspring.profiles.active=prod --build-cache --parallel | |
| BOOT_JAR_REPRO_SKIP_BUNDLE=1 bash backend/scripts/boot-jar-reproducible.sh | |
| Other-unit-tests: | |
| name: Other Unit Tests | |
| runs-on: ${{ vars.RUNNER }} | |
| env: | |
| FRONTEND_UT_CONSOLE_OUTPUT_AS_FAILURE: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/setup_nodejs_with_cache | |
| with: | |
| node_version: ${{ vars.NODE_VERSION }} | |
| pnpm_version: ${{ vars.PNPM_VERSION }} | |
| - run: pnpm frontend:test | |
| - run: pnpm mcp-server:test | |
| - run: pnpm cli:test | |
| - name: Run script unit tests | |
| run: bash scripts/test/run_all_script_tests.sh | |
| Package-artifacts: | |
| name: Package backend & frontend artifacts for deployment | |
| runs-on: ${{ vars.RUNNER }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/setup_jdk_with_cache | |
| with: | |
| java_version: ${{ vars.JAVA_VERSION }} | |
| - uses: ./.github/setup_nodejs_with_cache | |
| with: | |
| node_version: ${{ vars.NODE_VERSION }} | |
| pnpm_version: ${{ vars.PNPM_VERSION }} | |
| - name: Bundle MCP server & Compile & transform frontend assets for bundling with Backend | |
| run: pnpm bundle:all | |
| - name: Build application jar artifact | |
| run: backend/gradlew -p backend build -x test -Dspring.profiles.active=prod --build-cache --parallel | |
| - uses: ./.github/gcloud_auth_n_sdk | |
| with: | |
| credentials_json: ${{ env.GCP_CREDENTIALS }} | |
| skip_install: ${{ runner.os == 'Linux' && vars.GCP_FORCE_GCLOUD_INSTALL != 'true' }} | |
| - name: Upload frontend static to GCS | |
| env: | |
| GITHUB_SHA: ${{ github.sha }} | |
| run: infra/gcp/scripts/upload-frontend-static-to-gcs.sh | |
| - name: Upload CLI install binary to GCS | |
| run: infra/gcp/scripts/upload-cli-binary-to-gcs.sh | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ env.ARTIFACT }}-${{ env.VERSION }}.jar | |
| path: backend/build/libs/${{ env.ARTIFACT }}-${{ env.VERSION }}.jar | |
| E2E-tests: | |
| name: End-to-End tests with Database | |
| runs-on: ${{ vars.RUNNER }} | |
| strategy: | |
| matrix: | |
| spec: | |
| - | | |
| e2e_test/features/a*/** | |
| - | | |
| e2e_test/features/b*/** | |
| e2e_test/features/f*/** | |
| e2e_test/features/l*/** | |
| e2e_test/features/m*/** | |
| - | | |
| e2e_test/features/n*/** | |
| - | | |
| e2e_test/features/r*/** | |
| - | | |
| e2e_test/features/t*/** | |
| e2e_test/features/u*/** | |
| - | | |
| e2e_test/features/c*/** | |
| e2e_test/features/w*/** | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: docker/login-action@v3 | |
| with: | |
| username: ${{ env.DOCKERHUB_USERNAME }} | |
| password: ${{ env.DOCKERHUB_TOKEN }} | |
| - uses: ./.github/mysql_db | |
| with: | |
| mysql_version: ${{ env.MYSQL_VERSION }} | |
| mysql_db_host_port: ${{ vars.MYSQL_PORT }} | |
| mysql_db_container_port: ${{ vars.MYSQL_PORT }} | |
| mysql_db_instance: ${{ env.MYSQL_E2E_DB }} | |
| mysql_db_user: ${{ env.MYSQL_DB_USER }} | |
| mysql_db_password: ${{ env.MYSQL_DB_PASSWORD }} | |
| - name: Setup Redis DB Server | |
| uses: ./.github/redis_db | |
| with: | |
| redis_version: ${{ vars.REDIS_VERSION || env.REDIS_VERSION }} | |
| redis_port: ${{ vars.REDIS_PORT || env.REDIS_PORT }} | |
| - name: Setup JDK | |
| uses: ./.github/setup_jdk_with_cache | |
| with: | |
| java_version: ${{ vars.JAVA_VERSION }} | |
| - name: Setup E2E Cypress dependencies | |
| uses: ./.github/setup_nodejs_with_cache | |
| with: | |
| node_version: ${{ vars.NODE_VERSION }} | |
| pnpm_version: ${{ vars.PNPM_VERSION }} | |
| force_install: "true" | |
| - uses: cypress-io/github-action@v7.1.9 | |
| with: | |
| browser: chrome | |
| config-file: e2e_test/config/ci.ts | |
| build: pnpm bundle:all | |
| start: pnpm run-p -clnr backend:sut:ci start:mb local:lb | |
| wait-on: "http://127.0.0.1:5173/__lb__/ready" | |
| wait-on-timeout: 150 | |
| spec: ${{ matrix.spec }} | |
| install: true | |
| env: | |
| GITHUB_FOR_ISSUES_API_TOKEN: ${{ env.GITHUB_FOR_ISSUES_API_TOKEN }} | |
| # Node/wait-on: bypass HTTP(S)_PROXY for loopback so healthcheck is not answered 400 by a corporate proxy | |
| NO_PROXY: 127.0.0.1,localhost | |
| - uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: cypress-screenshots | |
| path: e2e_test/screenshots | |
| Deploy: | |
| name: GCP MIG Rolling Update Deploy | |
| runs-on: ${{ vars.RUNNER }} | |
| needs: | |
| [ | |
| Lint-N-Backend-Generated-Types-For-Frontend, | |
| Backend-unit-tests, | |
| Other-unit-tests, | |
| Package-artifacts, | |
| E2E-tests, | |
| ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ vars.NODE_VERSION }} | |
| - name: Install yaml for URL map scripts (avoid full monorepo pnpm) | |
| run: | | |
| mkdir -p node_modules | |
| npm install --prefix "$(pwd)/.ci-urlmap-node-deps" yaml@2.8.3 | |
| ln -sfn "$(pwd)/.ci-urlmap-node-deps/node_modules/yaml" node_modules/yaml | |
| - uses: ./.github/gcloud_auth_n_sdk | |
| with: | |
| credentials_json: ${{ env.GCP_CREDENTIALS }} | |
| skip_install: ${{ runner.os == 'Linux' && vars.GCP_FORCE_GCLOUD_INSTALL != 'true' }} | |
| - name: Download production application jar artifact | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: ${{ env.ARTIFACT }}-${{ env.VERSION }}.jar | |
| - name: Conditional GCS upload, MIG rolling replace, record last success | |
| run: | | |
| if git log -1 --format=%B "$GITHUB_SHA" | grep -qE 'force-deployment[[:space:]]*:[[:space:]]*true'; then | |
| export FORCE_FULL_DEPLOY=1 | |
| fi | |
| infra/gcp/scripts/deploy-backend-jar-to-gcp-mig.sh | |
| Notify-on-failure: | |
| name: Single slack/discord notification on CI/CD failure | |
| runs-on: ${{ vars.RUNNER }} | |
| needs: | |
| [ | |
| Lint-N-Backend-Generated-Types-For-Frontend, | |
| Backend-unit-tests, | |
| Other-unit-tests, | |
| Package-artifacts, | |
| E2E-tests, | |
| Deploy, | |
| ] | |
| if: always() | |
| steps: | |
| - uses: technote-space/workflow-conclusion-action@v3 | |
| id: conclusion | |
| - uses: 8398a7/action-slack@v3 | |
| if: steps.conclusion.outputs.conclusion == 'failure' | |
| with: | |
| status: failure | |
| fields: repo,commit,message,author,action,workflow,eventName | |
| # - uses: nobrayner/discord-webhook@v1 | |
| # if: steps.conclusion.outputs.conclusion == 'failure' | |
| # with: | |
| # github-token: ${{ env.GITHUB_TOKEN }} | |
| # discord-webhook: ${{ env.DISCORD_WEBHOOK_URL }} | |
| # mobile-unit-test: | |
| # runs-on: ${{ vars.RUNNER }} | |
| # steps: | |
| # - uses: actions/checkout@v5 | |
| # - uses: subosito/flutter-action@v2 | |
| # with: | |
| # flutter-version: ${{ vars.FLUTTER_VERSION }} | |
| # - run: flutter pub get | |
| # working-directory: ./doughnut_mobile | |
| # - run: flutter test | |
| # working-directory: ./doughnut_mobile | |
| # drive_ios: | |
| # strategy: | |
| # matrix: | |
| # device: | |
| # - "iPhone 15" | |
| # fail-fast: false | |
| # runs-on: ${{ vars.RUNNER }} | |
| # steps: | |
| # - name: List Simulators | |
| # run: xcrun xctrace list devices | |
| # - name: Start Simulator | |
| # run: xcrun simctl boot "${{ matrix.device }}" | |
| # - uses: actions/checkout@v6 | |
| # - uses: ./.github/starting_backend_actions | |
| # with: | |
| # java_version: ${{ vars.JAVA_VERSION }} | |
| # pnpm_version: ${{ vars.PNPM_VERSION }} | |
| # mysql_version: ${{ vars.MYSQL_VERSION }} | |
| # mysql_db_host_port: ${{ vars.MYSQL_PORT }} | |
| # mysql_db_container_port: ${{ vars.MYSQL_PORT }} | |
| # dbuser: ${{ secrets.DBUSER }} | |
| # dbpassword: ${{ secrets.DBPASSWORD }} | |
| # db_url: ${{ secrets.CI_E2E_DB_URL }} | |
| # - uses: ./.github/mobile_actions | |
| # with: | |
| # flutter-version: ${{ vars.FLUTTER_VERSION }} | |
| # - run: flutter test integration_test | |
| # working-directory: ./doughnut_mobile | |
| # drive_android: | |
| # runs-on: ${{ vars.RUNNER }} | |
| # #creates a build matrix for your jobs | |
| # strategy: | |
| # #set of different configurations of the virtual environment. | |
| # matrix: | |
| # api-level: [34] | |
| # steps: | |
| # - uses: actions/checkout@v6 | |
| # - uses: ./.github/starting_backend_actions | |
| # with: | |
| # java_version: ${{ vars.JAVA_VERSION }} | |
| # pnpm_version: ${{ vars.PNPM_VERSION }} | |
| # mysql_version: ${{ vars.MYSQL_VERSION }} | |
| # mysql_db_host_port: ${{ vars.MYSQL_PORT }} | |
| # mysql_db_container_port: ${{ vars.MYSQL_PORT }} | |
| # dbuser: ${{ secrets.DBUSER }} | |
| # dbpassword: ${{ secrets.DBPASSWORD }} | |
| # db_url: ${{ secrets.CI_E2E_DB_URL }} | |
| # - uses: ./.github/mobile_actions | |
| # with: | |
| # flutter-version: ${{ vars.FLUTTER_VERSION }} | |
| # - name: Run Flutter Driver tests | |
| # uses: reactivecircus/android-emulator-runner@v2 | |
| # with: | |
| # api-level: ${{ matrix.api-level }} | |
| # script: | | |
| # cd ./doughnut_mobile && flutter test integration_test |