Skip to content

Commit bb9e9d7

Browse files
committed
add ci
1 parent 60a63a6 commit bb9e9d7

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

.github/workflows/tests.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Unit tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version-file: '.nvmrc'
19+
cache: 'yarn'
20+
21+
# install dependencies
22+
- run: yarn install
23+
# build app
24+
- run: yarn build
25+
# check if lockfile is up to date
26+
- run: git diff --exit-code yarn.lock
27+
# run the typechecker
28+
- run: yarn typecheck
29+
# run unit tests
30+
- run: yarn test
31+
# run linter
32+
- run: yarn lint --max-warnings=0

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"develop": "yarn watch src/index.ts",
3030
"lint": "eslint src/**/*.ts",
3131
"build": "tsc -p .",
32-
"test": "jest"
32+
"test": "jest",
33+
"typecheck": "tsc -p . --noEmit"
3334
},
3435
"bin": {
3536
"typescript2python": "./dist/index.js"

0 commit comments

Comments
 (0)