Limit the number of vaults renderered during SSR to 100 #2976
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: Test and build container | |
| on: | |
| push: | |
| branches: [master] | |
| tags: [v*] | |
| pull_request: # we can use docker image in PR for testing | |
| branches: [master] | |
| env: | |
| REGISTRY: ghcr.io | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.19 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Code format check | |
| run: pnpm run format:check | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up SSH deploy key for fonts | |
| uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_DEPLOY_KEY_FONTS }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.19 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Setup submodules | |
| run: bash scripts/build-deps.sh | |
| - name: Install Playwright | |
| run: pnpm exec playwright install chromium --with-deps | |
| # use separate build step to avoid playwright timeout issue | |
| - name: Build SvelteKit vite app | |
| run: pnpm run build | |
| # skip build in test step | |
| - name: Run Tests | |
| run: pnpm run test:no-build | |
| - name: Upload Test Results | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-test-results | |
| path: | | |
| test-results/ | |
| tests/integration/**/*-snapshots/ | |
| retention-days: 7 | |
| compression-level: 0 # Skip compression since PNGs are already compressed | |
| build: | |
| runs-on: ubuntu-latest | |
| # 2023-02 disable because tests are too flaky and do not pass on CI at all | |
| # needs: test | |
| # Skip build on master push | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/master' | |
| steps: | |
| - name: Set up SSH deploy key for fonts | |
| uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_DEPLOY_KEY_FONTS }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Read metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ github.repository }} | |
| - name: Log in to Github Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| ssh: | | |
| default=${{ env.SSH_AUTH_SOCK }} | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| # experimental: https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| upload-sourcemaps: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Read metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ github.repository }} | |
| flavor: latest=false | |
| - name: Log in to Github Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload sourcemaps | |
| id: upload-sourcemaps | |
| continue-on-error: true | |
| env: | |
| SENTRY_ORG: ${{ vars.SENTRY_ORG }} | |
| SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
| SENTRY_URL: ${{ vars.SENTRY_URL }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_RELEASE: ${{ vars.SENTRY_PROJECT }}@${{ steps.meta.outputs.version }} | |
| run: | | |
| docker run --rm -e SENTRY_ORG -e SENTRY_PROJECT -e SENTRY_URL -e SENTRY_AUTH_TOKEN \ | |
| ${{ steps.meta.outputs.tags }} \ | |
| npx sentry-cli sourcemaps upload -r $SENTRY_RELEASE build/client build/server/chunks | |
| # GH action should still succeed even if sourcemaps upload failed | |
| - name: Echo failure message | |
| run: echo "Sourcemap upload failed" | |
| if: steps.upload-sourcemaps.outcome == 'failure' |