mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-05 23:15:58 -06:00
refactor: simplify npm scripts and streamline CI workflow
Consolidate package.json scripts from 17 to 10 by removing redundant test variants and combining type-check + lint into a single 'check' command. Update CI workflow to use simplified commands and merge separate unit/integration test steps into unified test execution. Update documentation to reflect new script structure.
This commit is contained in:
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -38,14 +38,11 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run linting
|
||||
run: pnpm lint
|
||||
|
||||
- name: Type checking
|
||||
run: pnpm type-check
|
||||
- name: Type checking and linting
|
||||
run: pnpm check
|
||||
|
||||
- name: Check formatting
|
||||
run: pnpm prettier --check .
|
||||
run: pnpm format:check
|
||||
|
||||
# Testing
|
||||
test:
|
||||
@@ -70,18 +67,13 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run unit tests
|
||||
run: pnpm test:run:coverage
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: Run integration tests
|
||||
run: pnpm test:integration:coverage
|
||||
- name: Run tests with coverage
|
||||
run: pnpm test:coverage
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: Run tests with junit reporter
|
||||
run: pnpm vitest run --reporter=junit --outputFile=test-report.junit.xml
|
||||
run: pnpm test -- --reporter=junit --outputFile=test-report.junit.xml
|
||||
if: always()
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
|
||||
11
README.md
11
README.md
@@ -124,14 +124,13 @@ The development server will be available at `http://localhost:3000`.
|
||||
# Run tests
|
||||
pnpm test
|
||||
|
||||
# Run tests with UI
|
||||
pnpm test:ui
|
||||
# Run tests with coverage
|
||||
pnpm test:coverage
|
||||
|
||||
# Type checking
|
||||
pnpm type-check
|
||||
# Type checking and linting
|
||||
pnpm check
|
||||
|
||||
# Linting
|
||||
pnpm lint
|
||||
# Fix linting issues
|
||||
pnpm lint:fix
|
||||
|
||||
# Code formatting
|
||||
|
||||
16
package.json
16
package.json
@@ -5,21 +5,13 @@
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
"dev": "next dev",
|
||||
"lint": "eslint .",
|
||||
"start": "next start",
|
||||
"test": "vitest run",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"check": "tsc --noEmit && eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"start": "next start",
|
||||
"test": "vitest",
|
||||
"test:ui": "vitest --ui",
|
||||
"test:run": "vitest run --exclude '**/*.integration.test.{ts,tsx}'",
|
||||
"test:run:coverage": "vitest run --coverage --exclude '**/*.integration.test.{ts,tsx}'",
|
||||
"test:integration": "vitest run src/__tests__/rdap-integration.test.ts",
|
||||
"test:integration:coverage": "vitest run --coverage src/__tests__/rdap-integration.test.ts",
|
||||
"test:all": "vitest run",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:all:coverage": "vitest run --coverage",
|
||||
"type-check": "tsc --noEmit",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user