Skip to content

Commit

Permalink
ci: check scripts (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored May 5, 2022
1 parent 3ea64ce commit 0b2863e
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 16 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,62 @@ jobs:
- name: Check formatting
run: pnpm prettier --check .

ts-check-scripts:
runs-on: ubuntu-latest
name: 'TS-Check Scripts: node-18, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7

- name: Set node version to 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'

- name: Install deps
run: pnpm install
env:
CYPRESS_INSTALL_BINARY: 0

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

ts-check-tests:
runs-on: ubuntu-latest
name: 'TS-Check Tests: node-18, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7

- name: Set node version to 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'

- name: Install deps
run: pnpm install
env:
CYPRESS_INSTALL_BINARY: 0

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

codecov:
runs-on: ubuntu-latest
name: 'Codecov: node-18, ubuntu-latest'
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
"docs:serve": "vitepress serve docs",
"format": "prettier --write .",
"lint": "eslint --cache --cache-strategy content .",
"ts-check:scripts": "tsc --project tsconfig.check-scripts.json",
"ts-check:tests": "tsc --project tsconfig.check-tests.json",
"test": "vitest",
"coverage": "vitest run --coverage",
"cypress": "cypress",
Expand Down Expand Up @@ -110,6 +112,7 @@
"eslint-plugin-jsdoc": "~39.2.9",
"eslint-plugin-prettier": "~4.0.0",
"esno": "~0.14.1",
"glob": "~8.0.1",
"lint-staged": "~12.4.1",
"mime-db": "~1.52.0",
"npm-run-all": "~4.1.5",
Expand Down
14 changes: 14 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ESNext",
"moduleResolution": "Node",
"module": "ESNext",
"noEmit": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"alwaysStrict": true,
// "strictNullChecks": true,
// "strictBindCallApply": true,
"strictFunctionTypes": true,
// "strictPropertyInitialization": true,
// "noImplicitAny": true,
// "noImplicitThis": true,
"useUnknownInCatchVariables": true
},
"exclude": ["node_modules"]
}
4 changes: 4 additions & 0 deletions tsconfig.check-scripts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.base.json",
"include": ["scripts/**/*.ts"]
}
4 changes: 4 additions & 0 deletions tsconfig.check-tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.base.json",
"include": ["test/**/*.ts"]
}
20 changes: 4 additions & 16 deletions tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"target": "ES2020",
"moduleResolution": "Node",
"esModuleInterop": true,
"allowJs": true,
"alwaysStrict": true,
// "strictNullChecks": true,
// "strictBindCallApply": true,
"strictFunctionTypes": true,
// "strictPropertyInitialization": true,
// "noImplicitAny": true,
// "noImplicitThis": true,
"useUnknownInCatchVariables": true,
"stripInternal": true,

"rootDir": ".",
"noEmit": true
},
"exclude": ["node_modules"]
"skipLibCheck": false,
"rootDir": "."
}
}

0 comments on commit 0b2863e

Please sign in to comment.