mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
feat(root): qa github action added
This commit is contained in:
parent
184d3a9c49
commit
fb570a372d
72
.github/workflows/QA.yaml
vendored
Normal file
72
.github/workflows/QA.yaml
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
name: QA
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install
|
||||
uses: ./.github/common-actions/install
|
||||
|
||||
- name: Build packages
|
||||
run: pnpm build
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install
|
||||
uses: ./.github/composite-actions/install
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm test
|
||||
|
||||
eslint:
|
||||
name: ESLint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install
|
||||
uses: ./.github/common-actions/install
|
||||
|
||||
- name: Run ESLint
|
||||
run: pnpm lint
|
||||
|
||||
types:
|
||||
name: TypeScript
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install
|
||||
uses: ./.github/common-actions/install
|
||||
|
||||
- name: Run typecheck
|
||||
run: pnpm typecheck
|
||||
|
||||
prettier:
|
||||
name: Prettier
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install
|
||||
uses: ./.github/common-actions/install
|
||||
|
||||
- name: Run prettier
|
||||
run: pnpm format:check
|
||||
@ -16,7 +16,7 @@ import {useState} from "react";
|
||||
|
||||
export default function Page() {
|
||||
const {isOpen, onOpen, onOpenChange} = useDisclosure();
|
||||
const [modalPlacement, setModalPlacement] = useState<ModalProps["placement"]>("auto");
|
||||
const [modalPlacement, setModalPlacement] = useState("auto");
|
||||
|
||||
return (
|
||||
<div className="flex px-10 min-h-[80vh] justify-center items-center flex-col gap-4">
|
||||
@ -36,7 +36,11 @@ export default function Page() {
|
||||
<Radio value="top-center">top-center</Radio>
|
||||
<Radio value="bottom-center">bottom-center</Radio>
|
||||
</RadioGroup>
|
||||
<Modal isOpen={isOpen} placement={modalPlacement} onOpenChange={onOpenChange}>
|
||||
<Modal
|
||||
isOpen={isOpen}
|
||||
placement={modalPlacement as ModalProps["placement"]}
|
||||
onOpenChange={onOpenChange}
|
||||
>
|
||||
<ModalContent>
|
||||
{(onClose) => (
|
||||
<>
|
||||
|
||||
@ -26,10 +26,13 @@
|
||||
"start:sb": "pnpx serve --filter @nextui-org/storybook start-storybook",
|
||||
"test": "jest --verbose --config ./jest.config.js",
|
||||
"typecheck": "turbo typecheck",
|
||||
"lint": "eslint -c .eslintrc.json ./packages/**/**/*.{ts,tsx}",
|
||||
"lint": "pnpm lint:pkg && pnpm lint:docs",
|
||||
"lint:pkg": "eslint -c .eslintrc.json ./packages/**/**/*.{ts,tsx}",
|
||||
"lint:docs": "eslint -c .eslintrc.json ./apps/docs/**/*.{ts,tsx}",
|
||||
"lint:fix": "eslint --fix -c .eslintrc.json ./packages/**/**/*.{ts,tsx}",
|
||||
"lint:docs-fix": "eslint --fix -c .eslintrc.json ./apps/docs/**/*.{ts,tsx}",
|
||||
"format:check": "prettier --check packages/**/**/src --cache",
|
||||
"format:write": "prettier --write packages/**/**/src --cache",
|
||||
"turbo:clean": "turbo clean && rimraf ./node_modules/.cache/turbo",
|
||||
"turbo:graph": "pnpm build --graph=dependency-graph.png",
|
||||
"clean": "pnpm turbo:clean && pnpm clean:jest && pnpm clean:node-modules && pnpm clean:lock && pnpm install --hoist",
|
||||
|
||||
@ -66,7 +66,11 @@ export function useReactAriaPopover(
|
||||
popoverRef,
|
||||
);
|
||||
|
||||
const {overlayProps: positionProps, arrowProps, placement} = useOverlayPosition({
|
||||
const {
|
||||
overlayProps: positionProps,
|
||||
arrowProps,
|
||||
placement,
|
||||
} = useOverlayPosition({
|
||||
...otherProps,
|
||||
scrollRef,
|
||||
crossOffset,
|
||||
|
||||
@ -90,7 +90,7 @@ export function useImage(props: UseImageProps = {}) {
|
||||
img.onload = (event) => {
|
||||
flush();
|
||||
setStatus("loaded");
|
||||
onLoad?.((event as unknown) as ImageEvent);
|
||||
onLoad?.(event as unknown as ImageEvent);
|
||||
};
|
||||
img.onerror = (error) => {
|
||||
flush();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user