Skip to main content
Glama
deleonio
by deleonio
visual-tests-base.yml2.92 kB
name: Visual Tests Snapshot Comparison on: pull_request: concurrency: group: 'workflow-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}' cancel-in-progress: true jobs: visual-tests-snapshots: strategy: matrix: package: ['test-tag-name-transformer', 'theme-default', 'theme-ecl'] runs-on: ubuntu-latest steps: - name: Checkout base branch uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.base.sha }} fetch-depth: 0 persist-credentials: false - uses: ./.github/actions/pnpm-setup - name: Install Playwright browsers run: npx playwright install --with-deps firefox - name: Build base branch run: pnpm --filter @public-ui/sample-react^... build - name: Generate base snapshots run: pnpm --filter=@public-ui/${{ matrix.package }} test-update - name: Store base snapshots run: | set -eo pipefail PACKAGE="${{ matrix.package }}" mkdir -p "/tmp/snapshots/${PACKAGE}" if [[ "${PACKAGE}" == 'test-tag-name-transformer' ]]; then SNAPSHOT_DIR="packages/test-tag-name-transformer/snapshots" else THEME_DIR="${PACKAGE#theme-}" SNAPSHOT_DIR="packages/themes/${THEME_DIR}/snapshots" fi if [ -d "$SNAPSHOT_DIR" ]; then rsync -a "$SNAPSHOT_DIR/" "/tmp/snapshots/${PACKAGE}/" fi - name: Checkout head branch uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 persist-credentials: false - uses: ./.github/actions/pnpm-setup - name: Restore base snapshots run: | set -eo pipefail PACKAGE="${{ matrix.package }}" if [[ "${PACKAGE}" == 'test-tag-name-transformer' ]]; then SNAPSHOT_DIR="packages/test-tag-name-transformer/snapshots" else THEME_DIR="${PACKAGE#theme-}" SNAPSHOT_DIR="packages/themes/${THEME_DIR}/snapshots" fi rm -rf "$SNAPSHOT_DIR" mkdir -p "$SNAPSHOT_DIR" if [ -d "/tmp/snapshots/${PACKAGE}" ]; then rsync -a "/tmp/snapshots/${PACKAGE}/" "$SNAPSHOT_DIR/" fi - name: Build head branch run: pnpm --filter @public-ui/sample-react^... build - name: Visual Tests run: pnpm --filter=@public-ui/${{ matrix.package }} test - uses: ./.github/actions/upload-reports if: failure() with: name: report-base-snapshots-${{ matrix.package }} - name: Upload base snapshots if: failure() uses: actions/upload-artifact@v5 with: name: base-snapshots-${{ matrix.package }} path: /tmp/snapshots/${{ matrix.package }} if-no-files-found: ignore

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deleonio/public-ui-kolibri'

If you have feedback or need assistance with the MCP directory API, please join our Discord server