Skip to content

Try replace-in-files instead of sed #14

Try replace-in-files instead of sed

Try replace-in-files instead of sed #14

Workflow file for this run

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
run: pnpx replace-in-files-cli --regex='"origin": ".*"' --replacement='"origin": "https://main.development.webstudio.is"' "./fixtures/*/.webstudio/data.json"

Check failure on line 54 in .github/workflows/fixtures-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/fixtures-test.yml

Invalid workflow file

You have an error in your yaml syntax on line 54
- 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