Skip to content

Commit

Permalink
fix(devops): install dependencies script
Browse files Browse the repository at this point in the history
* feat: add deepsource support for typescript

* fix: run ci/cd only when PR is marked ready

* chore: explictly exclude node_modules as per policy rule
  • Loading branch information
kylejb committed Jan 17, 2022
1 parent b08f028 commit f15dcec
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version = 1

test_patterns = [
"**/web/**/*.test.tsx",
"**/server/tests/**/*.test.ts",
]

[[analyzers]]
name = "javascript"
enabled = true

[analyzers.meta]
environment = [
"nodejs",
"jest",
"browser"
]
plugins = ["react"]
style_guide = "standard"
dialect = "typescript"
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
build:
if: github.event.pull_request.draft == false

runs-on: ubuntu-latest

Expand All @@ -22,6 +23,6 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run installAll
- run: npm run build --if-present
- run: npm test
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
**/yarn.lock
**/package-lock.json
**/jsconfig.json
**/.deepsource.toml
**/.github
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"typescript": "^4.5.4"
},
"scripts": {
"deps:server": "npm ci",
"deps:web": "cd web && npm ci",
"installAll": "npm run deps:server && npm run deps:web",
"start": "npx ts-node index.ts",
"build": "npx tsc && (cd web && npm run build)",
"test": "npm run test:server && npm run test:web",
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"allowJs": true,
"forceConsistentCasingInFileNames": true,
},
"include": [
"**.ts"
],
"exclude": [
"build",
"node_modules"
],
"include": [
"**.ts"
]
}
5 changes: 5 additions & 0 deletions web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"isolatedModules": true,
"noEmit": true
},
"exclude": [
"build",
"public",
"node_modules"
],
"include": [
"src"
]
Expand Down

0 comments on commit f15dcec

Please sign in to comment.