diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 6a65abdf..d2ceae19 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -14,6 +14,25 @@ concurrency: # TODO(@raducristianpopa): add lint/format checks and tests jobs: + checks: + name: ESLint, Prettier & Typecheck + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Environment setup + uses: ./.github/actions/setup + + - name: Lint + run: pnpm lint + + - name: Format + run: pnpm format + + - name: Typecheck + run: pnpm typecheck + build-extension: name: Build Extension strategy: diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index e8aeea55..894618b0 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -5,9 +5,28 @@ on: branches: - main -# TODO(@raducristianpopa): add lint/format checks and tests +# TODO(@raducristianpopa): add server tests jobs: + checks: + name: ESLint, Prettier, Typecheck + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Environment setup + uses: ./.github/actions/setup + + - name: Lint + run: pnpm lint + + - name: Format + run: pnpm format + + - name: Typecheck + run: pnpm typecheck + build-extension: name: Build extension strategy: diff --git a/package.json b/package.json index 4ab8cdd4..1865f16e 100644 --- a/package.json +++ b/package.json @@ -14,9 +14,10 @@ "format": "prettier --check .", "format:fix": "prettier --write .", "lint": "pnpm -r lint", - "lint:fix": "pnpm -r lint:fix eslint --ext js,jsx,ts,tsx, src --fix && prettier --write .", - "typecheck": "pnpm -r typecheck", + "lint:fix": "pnpm -r lint:fix", "test": "pnpm -r test", + "test:ci": "pnpm -r test:ci", + "typecheck": "pnpm -r typecheck", "extension": "pnpm --filter @interledger/wm-extension", "wm-server": "pnpm --filter @interledger/wm-server" }, diff --git a/packages/server/package.json b/packages/server/package.json index 72b5b719..4fbb7e19 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -12,8 +12,9 @@ "scripts": { "build": "tsc", "dev": "tsx --watch ./src/index.ts", - "lint": "eslint . --ext js,ts --max-warnings 0", - "lint:fix": "eslint . --ext ts --fix" + "lint": "eslint . --ext ts --cache --cache-location 'node_modules/.cache/.eslintcache' --max-warnings 0", + "lint:fix": "eslint . --ext ts --cache --cache-location 'node_modules/.cache/.eslintcache' --fix", + "typecheck": "tsc --noEmit" }, "dependencies": { "@interledger/http-signature-utils": "^2.0.0",