new-new-connect #2579
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: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| merge_group: | |
| types: [checks_requested] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: actions/cache@v4 | |
| id: playwright-cache | |
| with: | |
| path: | | |
| ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('**/bun.lockb') }} | |
| - name: Run tests | |
| run: | | |
| echo "::add-matcher::.github/tsc.json" | |
| ./test.sh | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: ${{ steps.playwright-cache.outputs.cache-hit }} | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: get commit date | |
| run: echo "VITE_APP_GIT_TIMESTAMP=$(git show -s --format=%cI)" >> $GITHUB_ENV | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| env: | |
| VITE_SENTRY_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }} | |
| VITE_APP_GIT_SHA: ${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }} | |
| - name: Bundle size breakdown | |
| run: bun cli/dependency-report.ts | column -t -s ":" | |
| - run: bun cli/bundle-size.ts ./dist | |
| - name: Upload built project | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./dist | |
| overwrite: true | |
| retention-days: 1 | |
| name: build-artifacts-${{ github.run_id }} |