diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee0a244..bdc5941 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/README.md b/README.md index fbaf542..ca058b8 100644 --- a/README.md +++ b/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 diff --git a/package.json b/package.json index cb14c5c..f7e601d 100644 --- a/package.json +++ b/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": {