File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,14 @@ permissions:
1111 contents : read
1212
1313jobs :
14+ lint :
15+ runs-on : ubuntu-22.04
16+ steps :
17+ - uses : actions/checkout@v3
18+ - run : npx prettier --check .
19+
1420 test :
21+ needs : lint
1522 strategy :
1623 fail-fast : false
1724 matrix :
4754 - name : Install dependencies
4855 run : npm ci
4956
50- - name : Check formatting
51- run : npx prettier --check .
52-
5357 - name : Run tests
5458 run : npm run test:${{ matrix.tests }}
5559 env :
Original file line number Diff line number Diff line change 11module . exports . handle = ( event , context , callback ) => {
22 // The scheduled event data is held in a JSON string in the body field
3- var eventBody = JSON . parse ( event . body )
3+ var eventBody = JSON . parse ( event . body ) ;
44
55 // Log the event data
6- console . log ( "foo = " + eventBody . foo )
7- console . log ( "bar = " + eventBody . bar )
6+ console . log ( "foo = " + eventBody . foo ) ;
7+ console . log ( "bar = " + eventBody . bar ) ;
88
99 // Return a success response
1010 const response = {
1111 statusCode : 200 ,
1212 headers : { "Content-Type" : [ "application/json" ] } ,
13- body : JSON . stringify ( { message : "Hello from scaleway functions" } ) ,
13+ body : JSON . stringify ( { message : "Hello from scaleway functions" } ) ,
1414 } ;
1515
1616 return response ;
You can’t perform that action at this time.
0 commit comments