From a4c82ba9266d8fc93dcdcb4131a8b28848c5a450 Mon Sep 17 00:00:00 2001 From: Vladimir Ulyanov Date: Sun, 8 Oct 2023 20:33:26 +0300 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20SNEGDEV-10=20=D1=81=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B0=D0=BB=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D1=83=20?= =?UTF-8?q?=D0=B8=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=20=D1=82=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=BE=D0=B2=20=D0=B2=20github=20action'=D0=B0?= =?UTF-8?q?=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ .node-version | 1 + apps/web/package.json | 10 +++++----- package.json | 1 + turbo.json | 5 +---- 5 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .node-version diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dc04dac --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + types: [opened, synchronize] + +jobs: + build: + name: Build and Test + timeout-minutes: 15 + runs-on: ubuntu-latest + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - uses: pnpm/action-setup@v2 + + - name: Setup Node.js environment + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm run build + + - name: Lint & Test + run: pnpm run check diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..209e3ef --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20 diff --git a/apps/web/package.json b/apps/web/package.json index d86f266..27bccb9 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -5,11 +5,11 @@ "type": "module", "sideEffect": false, "scripts": { - "dev": "next dev --turbo", - "build": "next build", - "start": "next start", - "lint": "next lint", - "typecheck": "tsc" + "disabled:dev": "next dev --turbo", + "disabled:build": "next build", + "disabled:start": "next start", + "disabled:lint": "next lint", + "disabled:typecheck": "tsc" }, "dependencies": { "@sneg240/tailwind": "workspace:*", diff --git a/package.json b/package.json index ca76e66..e5e7386 100644 --- a/package.json +++ b/package.json @@ -23,5 +23,6 @@ "prettier": "3.0.3", "turbo": "1.10.15" }, + "repository": "https://github.com/sneg240/frontend", "packageManager": "pnpm@8.6.10" } diff --git a/turbo.json b/turbo.json index fc1b686..b2255a6 100644 --- a/turbo.json +++ b/turbo.json @@ -4,7 +4,7 @@ "pipeline": { "build": { "dependsOn": ["^build"], - "outputs": [".next/**", "!.next/cache/**"] + "outputs": [".next/**", "!.next/cache/**", "storybook-static/**"] }, "check": { "dependsOn": ["lint", "typecheck"] @@ -14,9 +14,6 @@ "dev": { "cache": false, "persistent": true - }, - "crawl": { - "cache": false } } } From f8a23da2cb58b593ab8bab21592cb1473897bced Mon Sep 17 00:00:00 2001 From: Vladimir Ulyanov Date: Sun, 8 Oct 2023 22:47:29 +0300 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20SNEGDEV-10=20=D1=81=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B0=D0=BB=20=D0=B4=D0=B5=D0=BF=D0=BB=D0=BE=D0=B9=20?= =?UTF-8?q?=D1=81=D1=82=D0=BE=D1=80=D0=B8=D0=B1=D1=83=D0=BA=D0=B0=20=D0=B2?= =?UTF-8?q?=20chromatic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 11 ++++++++++- packages/ui/package.json | 1 + pnpm-lock.yaml | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc04dac..b28578a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - name: Check out code uses: actions/checkout@v4 with: - fetch-depth: 2 + fetch-depth: 10 # 👈 Нужно что бы chromatic хорошо работал, пока пробуем глубину истории 10 - uses: pnpm/action-setup@v2 @@ -37,3 +37,12 @@ jobs: - name: Lint & Test run: pnpm run check + + - name: Publish to Chromatic + uses: chromaui/action@v1 + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + workingDir: packages/ui + storybookBuildDir: storybook-static + debug: true + onlyChanged: true diff --git a/packages/ui/package.json b/packages/ui/package.json index 13de8ec..3294fa4 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -20,6 +20,7 @@ "@sneg240/tailwind": "workspace:*", "clsx": "2.0.0", "next": "13.5.4", + "chromatic": "7.2.3", "tailwindcss": "3.3.3" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8c34cb..84c59de 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,6 +134,9 @@ importers: '@sneg240/tailwind': specifier: workspace:* version: link:../tailwind + chromatic: + specifier: 7.2.3 + version: 7.2.3 clsx: specifier: 2.0.0 version: 2.0.0 @@ -5741,6 +5744,11 @@ packages: engines: {node: '>=10'} dev: true + /chromatic@7.2.3: + resolution: {integrity: sha512-UEcHB1nkPoHWoRybPzv6BOVqPr7PqDNuz3u8NCRg7KJciouOb20HjiUQx4Dh9mgA7JUsb2WeGHE2SG/0fHH0PA==} + hasBin: true + dev: false + /chrome-trace-event@1.0.3: resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} engines: {node: '>=6.0'} From bf6e1d3216004e1d7d1b111106e0d6809e81dfab Mon Sep 17 00:00:00 2001 From: Vladimir Ulyanov Date: Sun, 8 Oct 2023 22:55:21 +0300 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20SNEGDEV-10=20=D0=BE=D0=BF=D1=82?= =?UTF-8?q?=D0=B8=D0=BC=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20=D0=B4=D0=B5?= =?UTF-8?q?=D0=BF=D0=BB=D0=BE=D1=8F=20=D1=81=D1=82=D0=BE=D1=80=D0=B8=D0=B1?= =?UTF-8?q?=D1=83=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b28578a..903647a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,3 +46,5 @@ jobs: storybookBuildDir: storybook-static debug: true onlyChanged: true + zip: true + exitOnceUploaded: true From bea28671b777016544d55e2c0f8507e23ed419f2 Mon Sep 17 00:00:00 2001 From: Vladimir Ulyanov Date: Mon, 9 Oct 2023 00:51:54 +0300 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20SNEGDEV-10=20=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D0=BB=D1=8E=D1=87=D0=B8=D0=BB=20=D0=BE=D1=82=D0=BB=D0=B0=D0=B4?= =?UTF-8?q?=D0=BE=D1=87=D0=BD=D1=83=D1=8E=20=D0=BE=D0=BF=D1=86=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 903647a..837b4d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,6 @@ jobs: projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} workingDir: packages/ui storybookBuildDir: storybook-static - debug: true onlyChanged: true zip: true exitOnceUploaded: true