From 84cb15b63e10e9f65ede2d18dc7cb774fd2b1799 Mon Sep 17 00:00:00 2001 From: ge Datou <1635656638@qq.com> Date: Wed, 21 Feb 2024 12:12:50 +0800 Subject: [PATCH 1/6] Create demo.yml (#5) --- .github/workflows/demo.yml | 81 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/demo.yml diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml new file mode 100644 index 0000000..9f17841 --- /dev/null +++ b/.github/workflows/demo.yml @@ -0,0 +1,81 @@ +name: Demo + +on: + push: + branches: + - main + - next + + pull_request: + branches: + - main + - next + + merge_group: {} + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Set node + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: pnpm + + - name: Setup + run: npm i -g @antfu/ni + + - name: Install + run: nci + + - name: Lint + run: nr lint + + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node: [16.x, 18.x, 20.x] + fail-fast: false + + steps: + - uses: actions/checkout@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Set node version to ${{ matrix.node }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: pnpm + + - name: Setup + run: npm i -g @antfu/ni + + - name: Install + run: nci + + - name: Build + run: nr build + + - name: Typecheck + run: nr typecheck + + - name: Test Vue 3 + run: pnpm run test:3 + + - name: Test Vue 2 + run: pnpm run test:2 + + - if: matrix.node == '18.x' + name: Playground Smoke Test + run: cd playgrounds && bash ./build.sh From 529e8e7c604a9cd7183321c7bfcbbd30757028a6 Mon Sep 17 00:00:00 2001 From: Yangyang <1635656638@qq.com> Date: Wed, 21 Feb 2024 12:14:56 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20=F0=9F=A7=A9=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1fbcc55..3e062a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: - master # 这里只配置了main分支,所以只有推送main分支才会触发以下任务 workflow_dispatch: + merge_group: {} jobs: # 任务ID build-and-deploy: From b842cb05db176cd7515c652f18d54c5364cd7a90 Mon Sep 17 00:00:00 2001 From: Yangyang <1635656638@qq.com> Date: Wed, 21 Feb 2024 12:15:53 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix:=20=F0=9F=A7=A9=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/env.d.ts b/env.d.ts index 4839a5f..3c2d926 100644 --- a/env.d.ts +++ b/env.d.ts @@ -7,3 +7,4 @@ interface ImportMetaEnv { interface ImportMeta { readonly env: ImportMetaEnv } +// From 617f4b2ba3f85a334fc7912f693ea45092138406 Mon Sep 17 00:00:00 2001 From: Yangyang <1635656638@qq.com> Date: Wed, 21 Feb 2024 12:17:29 +0800 Subject: [PATCH 4/6] =?UTF-8?q?feat:=20=F0=9F=9A=80=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/demo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 9f17841..cae0ae8 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -3,12 +3,12 @@ name: Demo on: push: branches: - - main + - master - next pull_request: branches: - - main + - master - next merge_group: {} From d2044cb1fec377f13f53ce525e98326450457bdb Mon Sep 17 00:00:00 2001 From: Yangyang <1635656638@qq.com> Date: Wed, 21 Feb 2024 12:24:47 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=F0=9F=A7=A9=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/demo.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index cae0ae8..174223a 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -64,18 +64,14 @@ jobs: - name: Install run: nci - - name: Build - run: nr build - - - name: Typecheck - run: nr typecheck - - - name: Test Vue 3 - run: pnpm run test:3 - - - name: Test Vue 2 - run: pnpm run test:2 - - - if: matrix.node == '18.x' - name: Playground Smoke Test - run: cd playgrounds && bash ./build.sh + - name: Check QA Pass label + if: | + ! ( + contains(github.event.pull_request.labels.*.name, 'QA Passed') || + contains(github.event.pull_request.labels.*.name, 'QA Pass expected') + ) + run: | + echo "Needs 'QA passed' label for all except revert, test or chore PRs." + echo "chore PR is reserved for changes that don't change production." + echo "QA should check refactor or gated feature don't alter behavior." + exit 1; From 408f602c49a14c64938e9290ecd87da4570a30b1 Mon Sep 17 00:00:00 2001 From: Yangyang <1635656638@qq.com> Date: Wed, 21 Feb 2024 12:32:01 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix:=20=F0=9F=A7=A9=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/vite.config.ts b/vite.config.ts index 7a8da1d..df53a2e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,6 +7,7 @@ import UnoCSS from 'unocss/vite' import { defineConfig } from 'vite' import { installPlugin } from './src/plugins' +// export default defineConfig({ build: { cssMinify: 'lightningcss',