Nightly E2E Tests #2
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: Nightly E2E Tests | |
| on: | |
| schedule: | |
| # Run every day at 5:00 AM PT (12:00 UTC) | |
| - cron: '0 12 * * *' | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| e2e-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: '1.3.5' | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| */node_modules | |
| packages/*/node_modules | |
| key: ${{ runner.os }}-deps-${{ hashFiles('**/bun.lock*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-deps- | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Set environment variables | |
| env: | |
| SECRETS_CONTEXT: ${{ toJSON(secrets) }} | |
| run: | | |
| VAR_NAMES=$(bun scripts/generate-ci-env.ts) | |
| echo "$SECRETS_CONTEXT" | jq -r --argjson vars "$VAR_NAMES" ' | |
| to_entries | .[] | select(.key as $k | $vars | index($k)) | .key + "=" + .value | |
| ' >> $GITHUB_ENV | |
| echo "CODEBUFF_GITHUB_ACTIONS=true" >> $GITHUB_ENV | |
| echo "NEXT_PUBLIC_CB_ENVIRONMENT=test" >> $GITHUB_ENV | |
| echo "NEXT_PUBLIC_INFISICAL_UP=true" >> $GITHUB_ENV | |
| echo "CODEBUFF_GITHUB_TOKEN=${{ secrets.CODEBUFF_GITHUB_TOKEN }}" >> $GITHUB_ENV | |
| - name: Build SDK | |
| run: cd sdk && bun run build | |
| - name: Run .agents e2e tests | |
| run: cd .agents && bun run test:e2e --timeout=120000 | |
| # Documentation quality checks | |
| - name: Install Vale | |
| run: | | |
| wget -q https://github.com/errata-ai/vale/releases/download/v3.13.0/vale_3.13.0_Linux_64-bit.tar.gz | |
| tar -xzf vale_3.13.0_Linux_64-bit.tar.gz | |
| sudo mv vale /usr/local/bin/ | |
| vale --version | |
| - name: Run Vale docs linting | |
| run: cd web && vale src/content/ --minAlertLevel=warning | |
| - name: Run documentation content integrity tests | |
| run: cd web && bun run test:docs:integrity | |
| - name: Install Playwright browsers | |
| run: cd web && bunx playwright install --with-deps chromium | |
| - name: Run web E2E tests (chromium) | |
| run: cd web && bun run e2e --project=chromium | |
| - name: Upload Playwright report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: debug/playwright-report/ | |
| retention-days: 7 | |
| - name: Cleanup e2e database | |
| if: always() | |
| run: bun --cwd packages/internal db:e2e:down |