Files
webstudio/.github/workflows/main.yml
T
Ivan Starkov 3cf9f315fd feat: Add title support to HeadSlot (#4758)
## Description

Add Title to headSlot

## Steps for reproduction

Add title
<img width="847" alt="image"
src="https://github.com/user-attachments/assets/d79f1659-b2cc-4b69-aedf-8989dccde118"
/>

Check it's shown and not duplicated.

<img width="450" alt="image"
src="https://github.com/user-attachments/assets/4222f3f8-57f2-43fa-bda4-64e3e70bd748"
/>


## 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-19 09:08:23 +03:00

102 lines
3.1 KiB
YAML

name: Main workflow
on:
push:
branches:
- main
pull_request:
# cancel in-progress runs on new commits to same PR (gitub.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
checks:
timeout-minutes: 20
env:
DATABASE_URL: postgres://
AUTH_SECRET: test
runs-on: ubuntu-24.04-arm
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
- uses: actions/cache@v4
with:
path: |
./node_modules/.cache/prettier/.prettier-cache
./node_modules/.cache/eslint/.eslint-cache
key: checks-${{ github.sha }}
restore-keys: checks-
- run: echo ===SHA USED=== ${{ github.event.pull_request.head.sha || github.sha }} # todo: remove after check whats happening on main
- run: pnpm prettier --cache --check "**/*.{js,md,ts,tsx}"
- run: pnpm lint --cache --cache-strategy=content --cache-location=node_modules/.cache/eslint/.eslint-cache
- run: pnpm -r test
- run: pnpm --filter=@webstudio-is/prisma-client build
- run: pnpm -r typecheck
check-size:
runs-on: ubuntu-latest
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
- run: pnpm --filter "{./fixtures/*}..." build
- uses: actions/github-script@v7
with:
script: |
const assertSize = async (directory, maxSize) => {
let result = ''
await exec.exec('du', ['-sk', directory], {
silent: true,
listeners: {
stdout: (data) => {
result += data.toString()
}
}
})
const size = Number.parseInt(result, 10)
return {
passed: size <= maxSize,
size,
diff: size - maxSize,
directory,
}
}
const results = [
await assertSize('./fixtures/ssg/dist/client', 352),
await assertSize('./fixtures/webstudio-remix-netlify-functions/build/client', 440),
await assertSize('./fixtures/webstudio-remix-vercel/build/client', 926),
]
for (const result of results) {
if (result.passed) {
console.info(`${result.directory}: ${result.size}kB (${result.diff}kB)`)
} else {
console.info('')
console.error(`${result.directory}: ${result.size}kB (+${result.diff}kB)`)
}
}
if (results.some(result => result.passed === false)) {
console.error('Some fixtures exceeded limits')
process.exit(1)
}