feat(tts): adaptive first-chunk sizing and render throttle; fix(opena… #91
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
| name: Main Branch Delivery | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build and Upload Artifacts | |
| runs-on: ubuntu-latest | |
| env: | |
| POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }} | |
| VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }} | |
| POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }} | |
| VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Write version file | |
| run: node tools/write-version.mjs | |
| - name: Build | |
| run: npm run build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dist | |
| report-build-status: | |
| name: Report Build Status | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: always() | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Report Build Status | |
| run: node tools/report-build-status.mjs | |
| env: | |
| BUILD_RESULT: ${{ needs.build.result }} | |
| tests-core: | |
| name: Build Tests (core) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| env: | |
| POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }} | |
| VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }} | |
| POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }} | |
| VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { submodules: recursive } | |
| - uses: actions/setup-node@v4 | |
| with: { node-version: '20', cache: 'npm' } | |
| - run: npm install | |
| - name: Build Tests (core suite) | |
| run: node tools/run-tests.mjs --pattern "^(?!all-models-(live|deep)|tts-live|models-export).*\\.test\\.mjs$" --output reports/test-results-core.json | |
| - name: Upload core test report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: main-tests-core | |
| path: reports/test-results-core.json | |
| if-no-files-found: warn | |
| tests-live: | |
| name: Build Tests (live models) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| continue-on-error: true | |
| env: | |
| POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }} | |
| VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }} | |
| POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }} | |
| VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { submodules: recursive } | |
| - uses: actions/setup-node@v4 | |
| with: { node-version: '20', cache: 'npm' } | |
| - run: npm install | |
| - name: Build Tests (live sweep) | |
| run: node tools/run-tests.mjs --pattern "all-models-live" --output reports/test-results-live.json | |
| - name: Upload live test report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: main-tests-live | |
| path: reports/test-results-live.json | |
| if-no-files-found: warn | |
| tests-tts: | |
| name: Build Tests (tts) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| continue-on-error: true | |
| env: | |
| POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }} | |
| VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }} | |
| POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }} | |
| VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { submodules: recursive } | |
| - uses: actions/setup-node@v4 | |
| with: { node-version: '20', cache: 'npm' } | |
| - run: npm install | |
| - name: Build Tests (tts live) | |
| run: node tools/run-tests.mjs --pattern "tts-live" --output reports/test-results-tts.json | |
| - name: Upload tts test report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: main-tests-tts | |
| path: reports/test-results-tts.json | |
| if-no-files-found: warn | |
| tests-models: | |
| name: Build Tests (models export) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: { node-version: '20', cache: 'npm' } | |
| - run: npm install | |
| - name: Build Tests (models export) | |
| run: node tools/run-tests.mjs --pattern "models-export" --output reports/test-results-models.json | |
| - name: Upload models export report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: main-tests-models | |
| path: reports/test-results-models.json | |
| if-no-files-found: warn | |
| tests-deep: | |
| name: Build Tests (deep sweep) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| continue-on-error: true | |
| env: | |
| MODELS_DEEP_ENABLED: 1 | |
| POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }} | |
| VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }} | |
| POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }} | |
| VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { submodules: recursive } | |
| - uses: actions/setup-node@v4 | |
| with: { node-version: '20', cache: 'npm' } | |
| - run: npm install | |
| - name: Build Tests (deep sweep) | |
| run: node tools/run-tests.mjs --pattern "all-models-deep" --output reports/test-results-deep.json | |
| - name: Upload deep sweep report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: main-tests-deep | |
| path: reports/test-results-deep.json | |
| if-no-files-found: warn | |
| deploy: | |
| name: Deploy to Pages | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: ${{ needs.build.result == 'success' }} | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| report-tests: | |
| name: Report Tests Statuses | |
| runs-on: ubuntu-latest | |
| needs: [tests-core, tests-live, tests-tts, tests-models, tests-deep] | |
| if: always() | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download core tests | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: { name: main-tests-core, path: reports } | |
| - name: Download live tests | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: { name: main-tests-live, path: reports } | |
| - name: Download tts tests | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: { name: main-tests-tts, path: reports } | |
| - name: Download models export tests | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: { name: main-tests-models, path: reports } | |
| - name: Download deep tests | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: { name: main-tests-deep, path: reports } | |
| - name: Report core tests | |
| run: node tools/report-tests.mjs --title "Core Tests" --results reports/test-results-core.json | |
| - name: Report live tests | |
| run: node tools/report-tests.mjs --title "Live Models Sweep" --results reports/test-results-live.json | |
| - name: Report tts tests | |
| run: node tools/report-tests.mjs --title "TTS Live" --results reports/test-results-tts.json | |
| - name: Report models export | |
| run: node tools/report-tests.mjs --title "Models Export" --results reports/test-results-models.json | |
| - name: Report deep sweep | |
| run: node tools/report-tests.mjs --title "Deep Sweep" --results reports/test-results-deep.json |