Skip to content

Commit

Permalink
check TS
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronshaf committed Nov 16, 2024
1 parent f5b10da commit 8677f24
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 122 deletions.
120 changes: 0 additions & 120 deletions .github/workflows/ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Run Playwright tests"
name: "Playwright Tests"

on:
pull_request:
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: TypeScript Check

on:
push:
branches:
- main
- 'releases/*'
pull_request:
branches:
- main
- 'releases/*'
workflow_dispatch:

jobs:
type-check:
name: Run TypeScript Check for idb-cache
runs-on: ubuntu-22.04

steps:
# 1. Checkout the repository
- uses: actions/checkout@v3

# 2. Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

# 3. Setup pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7.x

# 4: Cache pnpm dependencies (pnpm store and node_modules)
- name: Cache pnpm dependencies
uses: actions/cache@v3
with:
path: |
~/.pnpm-store
node_modules
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# 5: Install dependencies
- name: Install dependencies
run: pnpm install

# 6: Run TypeScript Check and Save Logs
- name: Run TypeScript Check
run: |
mkdir -p logs
pnpm --filter packages/idb-cache typescript:check > logs/typescript-errors.log 2>&1 || true
# 7: Upload TypeScript Logs (on failure)
- name: Upload TypeScript Logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: typescript-errors
path: logs/typescript-errors.log
3 changes: 2 additions & 1 deletion packages/idb-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"scripts": {
"build": "rslib build",
"dev": "rslib build --watch",
"biome:check": "biome check . --write"
"biome:check": "biome check . --write",
"typescript:check": "tsc --noEmit"
},
"peerDependencies": {
"@rslib/core": "^0.0.15"
Expand Down

0 comments on commit 8677f24

Please sign in to comment.