Files
webstudio/.github/workflows/fixtures-test.yml
T
Ivan Starkov 050b9bd34c build: Fix build (#4716)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2025-01-05 10:01:43 +03:00

68 lines
1.8 KiB
YAML

name: Fixtures tests
on:
workflow_call:
inputs:
builder-url:
required: true
type: string
builder-host:
required: true
type: string
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
checks:
timeout-minutes: 20
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
DATABASE_URL: postgres://
AUTH_SECRET: test
BUILDER_URL_DEPRECATED: ${{ inputs.builder-url }}
BUILDER_HOST: ${{ inputs.builder-host }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
- uses: ./.github/actions/ci-setup
# Testing fixtures for vercel template
- name: Test cli --help flag
working-directory: ./fixtures/webstudio-remix-vercel
run: pnpm cli --help
- name: Testing cli link command
run: pnpm --filter='./fixtures/*' --sequential run fixtures:link
- name: Testing cli sync command
run: pnpm --filter='./fixtures/*' run --parallel fixtures:sync
- name: Testing cli build command
run: pnpm --filter='./fixtures/*' run --parallel fixtures:build
- name: Prepare for diffing
shell: bash
run: |
find . -type f -path "./fixtures/*/.webstudio/data.json" -exec sed -i 's|"origin": ".*"|"origin": "https://main.development.webstudio.is"|g' {} +
- name: Test git diff
# This command will fail if there are uncommitted changes, i.e something has broken
run: git diff --name-only HEAD --exit-code
- name: Show changed files and diff
if: ${{ failure() }}
run: |
echo "Changed files are:"
git diff --name-only HEAD
git diff HEAD | head -n 1000