File tree Expand file tree Collapse file tree 4 files changed +43
-1
lines changed Expand file tree Collapse file tree 4 files changed +43
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches : main
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v2
13
+ - uses : actions/setup-node@v2
14
+ with :
15
+ cache : yarn
16
+ - run : yarn install
17
+ - run : yarn build
18
+ - run : yarn test
19
+ - run : yarn run check-git-clean
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+
3
+ if ! git diff --quiet; then echo "
4
+
5
+ The CI build resulted in additional changed files.
6
+ Typically this is due to not running yarn build locally before
7
+ submitting a pull request.
8
+
9
+ The following changes were found:
10
+ " ;
11
+
12
+ git diff --exit-code;
13
+ fi ;
Original file line number Diff line number Diff line change @@ -10,3 +10,12 @@ var helloWord = function helloWord() {
10
10
} ;
11
11
12
12
exports . helloWord = helloWord ;
13
+ "use strict" ;
14
+
15
+ var _ = require ( "." ) ;
16
+
17
+ describe ( "helloWord" , function ( ) {
18
+ test ( "is hello world" , function ( ) {
19
+ expect ( ( 0 , _ . helloWord ) ( ) ) . toBe ( "Hello, World!" ) ;
20
+ } ) ;
21
+ } ) ;
Original file line number Diff line number Diff line change 7
7
"build" : " babel src -o dist/index.js" ,
8
8
"dev" : " watch 'yarn run build' src" ,
9
9
"test" : " jest" ,
10
- "test:watch" : " yarn run test -- --watch"
10
+ "test:watch" : " yarn run test -- --watch" ,
11
+ "check-git-clean" : " ./check-git-clean.sh"
11
12
},
12
13
"babel" : {
13
14
"presets" : [
You can’t perform that action at this time.
0 commit comments