Skip to content

Commit

Permalink
chore: Type CheckとLint実行用のGHAを導入する (#DTB-2074) (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-se authored Apr 25, 2024
1 parent f1c5f7e commit 76719ad
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Check
on:
workflow_dispatch:
pull_request:
paths:
- "**.ts"
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
type-check:
name: type-check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "yarn.lock"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Type check
run: yarn type-check

lint:
name: lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "yarn.lock"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"include": [
"src"
],
"exclude": [
"dist",
"node_modules"
],
"compilerOptions": {
"outDir": "build",
"target": "ES2019",
Expand All @@ -14,5 +18,9 @@
"esModuleInterop": true,
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true
}
}

0 comments on commit 76719ad

Please sign in to comment.