Skip to content

Commit

Permalink
infra: add ts-check (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Mar 4, 2024
1 parent bd554b2 commit ea912cd
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,32 @@ jobs:
- name: Check formatting
run: pnpm prettier --check .

ts-check:
runs-on: ubuntu-latest
timeout-minutes: 10
name: 'TS-Check: node-20, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0

- name: Set node version to 20
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: 'pnpm'

- name: Install deps
run: pnpm install

- name: Build types
run: pnpm run build:types

- name: Check scripts
run: pnpm run ts-check

create-migration-test:
runs-on: ubuntu-latest
strategy:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"build": "run-s build:clean build:code build:types",
"format": "prettier --cache --write .",
"lint": "eslint --cache --cache-strategy content --report-unused-disable-directives .",
"ts-check": "tsc",
"test": "cross-env NODE_ENV=test mocha --require ./mocha.bootstrap.js \"test/*.ts\"",
"docs:dev": "docsify serve docs",
"migrate": "node bin/node-pg-migrate.js",
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build",
"preflight": "pnpm install && run-s format build lint test"
"preflight": "pnpm install && run-s format build lint test ts-check"
},
"bin": {
"node-pg-migrate": "bin/node-pg-migrate.js"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"target": "ES2017",
"module": "CommonJS",
"moduleResolution": "Node",
"lib": ["ES2019"],
"lib": ["ES2019", "DOM"],
"noEmit": true,
"esModuleInterop": true,
"sourceMap": false,
Expand Down

0 comments on commit ea912cd

Please sign in to comment.