Skip to content

Commit 697524c

Browse files
ian-wdiBotPeaches
authored andcommitted
ci: init test and lint
1 parent 7f2e7b7 commit 697524c

File tree

5 files changed

+34
-3
lines changed

5 files changed

+34
-3
lines changed

.github/workflows/workflow.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: RNSketchCanvas CI
2+
on: [push]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-20.04
7+
name: Lint and Tests
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-node@v3
11+
with:
12+
node-version: 16
13+
cache: 'yarn'
14+
15+
- name: Yarn Install
16+
run: yarn install
17+
18+
- name: Linting
19+
run: yarn lint
20+
21+
- name: Typing
22+
run: yarn typescript
23+
24+
- name: Testing
25+
run: yarn test --coverage
26+
27+
- name: Prepare Build
28+
run: yarn prepare

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ local.properties
3434
#
3535
node_modules/
3636
npm-debug.log
37+
yarn-debug.log
38+
yarn-error.log
39+
coverage/
3740

3841
# BUCK
3942
buck-out/

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
],
2929
"scripts": {
3030
"test": "jest",
31+
"typescript": "tsc --noEmit",
3132
"lint": "eslint \"**/*.{js,ts,tsx}\"",
3233
"prepare": "bob build",
3334
"example": "yarn --cwd example",

src/__tests__/SketchCanvas.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ import SketchCanvas from '../SketchCanvas';
66
import renderer from 'react-test-renderer';
77

88
it('renders correctly', () => {
9-
console.log(SketchCanvas);
109
renderer.create(<SketchCanvas />);
1110
});

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"noImplicitReturns": true,
1818
"noImplicitUseStrict": false,
1919
"noStrictGenericChecks": false,
20-
"noUnusedLocals": true,
21-
"noUnusedParameters": true,
20+
"noUnusedLocals": false,
21+
"noUnusedParameters": false,
2222
"resolveJsonModule": true,
2323
"skipLibCheck": true,
2424
"strict": true,

0 commit comments

Comments
 (0)