Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Test push (#1622)

Ivan Starkovb1326b530698
diff --git a/.github/actions/ci-setup/action.yml b/.github/actions/ci-setup/action.yml
index 0ef9c6d2e8..9536bf8226 100644
--- a/.github/actions/ci-setup/action.yml
+++ b/.github/actions/ci-setup/action.yml
@@ -1,29 +1,16 @@
name: CI setup
+description: |
+ Sets up the CI environment for the project.
+
runs:
using: "composite"
steps:
- - name: Setup Node
- uses: actions/setup-node@v3
- with:
- node-version: 16
-
- - run: corepack enable
- shell: bash
-
- - name: Get pnpm cache directory path
- id: pnpm-cache-dir-path
- run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- shell: bash
-
- - uses: actions/cache@v3
+ - uses: pnpm/[email protected]
+ - uses: actions/setup-node@v3
with:
- path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
- key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-pnpm-
-
- - name: Install Dependencies
- run: pnpm install --frozen-lockfile --ignore-scripts
+ node-version: "16.x"
+ cache: pnpm
+ - run: pnpm install --frozen-lockfile --ignore-scripts
shell: bash
diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml
index 4f687f3874..9519d3e29c 100644
--- a/.github/workflows/chromatic.yml
+++ b/.github/workflows/chromatic.yml
@@ -1,6 +1,18 @@
name: Chromatic
-on: [push]
+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:
chromatic:
@@ -49,6 +61,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 2 # we need to fetch at least parent commit to satisfy Chromatic
+ ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
- uses: ./.github/actions/ci-setup
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index b1dfd96e25..04a8543f7b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,6 +1,18 @@
name: Main workflow
-on: [push]
+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:
@@ -14,6 +26,9 @@ jobs:
steps:
- uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
+
- uses: ./.github/actions/ci-setup
- uses: actions/cache@v3
@@ -23,6 +38,8 @@ jobs:
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 turbo run size-test build checks dts
diff --git a/.github/workflows/vis-reg-tests.yml b/.github/workflows/vis-reg-tests.yml
index 9ad1652c60..f691a5db59 100644
--- a/.github/workflows/vis-reg-tests.yml
+++ b/.github/workflows/vis-reg-tests.yml
@@ -1,5 +1,18 @@
name: Visual Regression Tests
-on: [push]
+
+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:
design-system:
@@ -7,6 +20,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
+
- uses: ./.github/actions/ci-setup
- name: Build Storybook for Design System
@@ -25,6 +41,9 @@ jobs:
AUTH_SECRET: test
steps:
- uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
+
- uses: ./.github/actions/ci-setup
- name: Build Storybook for Builder