Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

123 #7

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master # 这里只配置了main分支,所以只有推送main分支才会触发以下任务
workflow_dispatch:
merge_group: {}
jobs:
# 任务ID
build-and-deploy:
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Demo

on:
push:
branches:
- master
- next

pull_request:
branches:
- master
- 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: 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;
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ interface ImportMetaEnv {
interface ImportMeta {
readonly env: ImportMetaEnv
}
//
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import UnoCSS from 'unocss/vite'
import { defineConfig } from 'vite'
import { installPlugin } from './src/plugins'

//
export default defineConfig({
build: {
cssMinify: 'lightningcss',
Expand Down
Loading