Update test results DB #192
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: "Update test results DB" | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 */3 * * *" | |
| concurrency: | |
| group: test-results-db | |
| cancel-in-progress: false | |
| jobs: | |
| update: | |
| name: Update DuckDB | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 60 | |
| if: github.repository == 'microsoft/playwright' | |
| permissions: | |
| actions: read | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| - run: npm ci | |
| - name: Download current database | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: node utils/test-results-db/cli.ts download | |
| - name: Ingest new test results | |
| id: ingest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_OPTIONS: --max-old-space-size=8192 | |
| run: node utils/test-results-db/cli.ts update --lookback-days 7 --concurrency 32 | |
| - name: Truncate to run cap | |
| if: steps.ingest.outputs.imported != '0' | |
| run: node utils/test-results-db/cli.ts truncate --max-runs 2000 | |
| - name: Upload database | |
| if: steps.ingest.outputs.imported != '0' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-results-db | |
| path: utils/test-results-db/test-results.duckdb | |
| retention-days: 7 | |
| overwrite: true |