From 61b4eef6bf6efe8504a36f00c0411ec13fe16934 Mon Sep 17 00:00:00 2001 From: Sin-Kang Date: Sat, 17 Oct 2026 18:13:11 +0900 Subject: [PATCH 1/4] chore: focus tests on behavior and reduce redundant CI work --- .github/workflows/ci.yml | 16 +++++--- .github/workflows/release.yml | 4 +- AGENTS.md | 16 ++++++++ tests/dds-solid-contracts.test.mjs | 65 ------------------------------ tests/dds-table-contracts.test.mjs | 27 +++++-------- 5 files changed, 37 insertions(+), 91 deletions(-) create mode 100644 AGENTS.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d425ca9..6ab4894 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,15 @@ on: branches: [main] pull_request: +# Cancel superseded pull request runs; main verification runs finish normally. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: source-contracts: runs-on: ubuntu-latest + timeout-minutes: 60 steps: - uses: actions/checkout@v7 - uses: pnpm/action-setup@v6 @@ -20,6 +26,7 @@ jobs: verify: needs: source-contracts runs-on: ubuntu-latest + timeout-minutes: 60 steps: - uses: actions/checkout@v7 - uses: pnpm/action-setup@v6 @@ -33,27 +40,24 @@ jobs: - run: pnpm run verify:canary:test - run: pnpm run verify:canary:build - run: pnpm run verify:canary:preview + # Includes the Storybook build and browser foundation checks. - run: pnpm run verify:foundation - run: pnpm run verify:release + # Package test scripts include their axe suites; avoid running them twice. - run: pnpm run verify:solid:test - - run: pnpm run verify:solid:a11y - run: pnpm run verify:solid:release - run: pnpm run verify:table:test - - run: pnpm run verify:table:a11y - run: pnpm run verify:table:release - run: pnpm run verify:react:test - - run: pnpm run verify:react:a11y - run: pnpm run verify:react:browser - run: pnpm run verify:react:release - run: pnpm run verify:table-react:test - run: pnpm run verify:table-react:browser - run: pnpm run verify:table-react:release + # i18n and SEO share these same core/publisher suites. - run: pnpm run verify:site-kit:i18n - run: pnpm run verify:site-kit:ui - - run: pnpm run verify:site-kit:seo - run: pnpm run verify:site-kit:browser - run: pnpm run verify:site-kit:release # build all packages, then validate token JSON + docs/preview sync - run: pnpm run verify - # stories must keep building against the current CSS/tokens - - run: pnpm exec storybook build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bc5438..ef386ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,14 +59,12 @@ jobs: - run: pnpm run verify:canary:preview - run: pnpm run verify:foundation - run: pnpm run verify:release + # Package test scripts already include their axe suites. - run: pnpm run verify:solid:test - - run: pnpm run verify:solid:a11y - run: pnpm run verify:solid:release - run: pnpm run verify:table:test - - run: pnpm run verify:table:a11y - run: pnpm run verify:table:release - run: pnpm run verify:react:test - - run: pnpm run verify:react:a11y - run: pnpm run verify:react:browser - run: pnpm run verify:react:release - run: pnpm run verify:table-react:test diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..60225ab --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,16 @@ +# dds 작업 지침 + + +## 테스트 가치와 CI 비용 + +- 테스트는 실제 사용자 동작, 공개 API/호환성, 권한·보안, 데이터 무결성/손실 방지와 재현된 장애의 회귀 방지에 집중한다. +- 문서·문구·단순 스타일·설정 등 영향이 작은 변경에 테스트를 자동으로 추가하지 않는다. 새 파일보다 기존 테스트 보강을 우선한다. +- 구현을 그대로 복사한 예상값, 특정 변수명·CSS/JSX 문자열·파일 배치·전체 설정 스냅샷은 실제 계약이 아닌 한 새로 고정하지 않는다. 실제 접근성·보안·배포 계약을 소스 검사라는 이유만으로 없애지 않는다. +- 중복 검사는 보호 대상과 기존 대체 검사를 확인해 통합한다. 중요한 단위·통합·E2E 검사가 서로 다른 실패를 잡는다면 유지한다. 삭제/통합 이유와 남는 검증을 PR에 기록한다. +- 수정 중에는 실패한 테스트와 변경 영향 범위부터 실행한다. 실패를 확인하고 원인을 고치며, 성공할 때까지 근거 없이 반복 실행하거나 기준을 낮추지 않는다. +- 같은 커밋(SHA)의 CI 재시도는 `gh run rerun RUN_ID --failed --repo devslab-kr/REPOSITORY` 또는 특정 `--job JOB_ID`를 우선한다. 성공한 작업까지 다시 돌리는 전체 재시도는 필요한 근거가 있을 때만 한다. +- GitHub의 실패 작업 재시도는 그 작업의 준비 단계 전체와 필요한 후속 작업을 다시 실행할 수 있다. 로컬은 테스트 도구의 파일/케이스 필터로 실패 범위를 좁힌다. +- 코드를 수정해 SHA가 바뀌면 과거 SHA의 성공을 새 코드의 검증으로 간주하지 않는다. 수정 영향·의존 범위를 재검증하고 저장소의 필수 병합/릴리스 검증을 충족한다. 같은 SHA에서 이미 성공한 작업은 불필요하게 반복하지 않는다. +- PR의 오래된 실행은 concurrency로 취소하되 배포·릴리스 작업은 임의로 중단하지 않는다. 캐시·빌드 재사용으로 중복 비용을 줄이고 테스트 생략·실패 무시로 비용을 줄이지 않는다. +- 보고에는 검증한 SHA, 실행 명령/작업, 결과, 실행하지 않은 범위와 이유를 남긴다. 테스트 파일 수·커버리지 수치 자체를 목표로 삼지 않는다. + diff --git a/tests/dds-solid-contracts.test.mjs b/tests/dds-solid-contracts.test.mjs index f1f8e23..ab93e7f 100644 --- a/tests/dds-solid-contracts.test.mjs +++ b/tests/dds-solid-contracts.test.mjs @@ -33,51 +33,6 @@ test("dds-solid is a public exact-version package with stable exports", async () ]) assert.match(entry, new RegExp(`\\b${symbol}\\b`), `${symbol} must be exported`); }); -test("native controls preserve semantic elements and accessible names", async () => { - const controls = await read("packages/dds-solid/src/controls.tsx"); - assert.match(controls, /