Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: npx prettier --check .

test:
needs: lint
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -47,9 +54,6 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Check formatting
run: npx prettier --check .

- name: Run tests
run: npm run test:${{ matrix.tests }}
env:
Expand Down
8 changes: 4 additions & 4 deletions examples/nodejs-schedule/handler.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module.exports.handle = (event, context, callback) => {
// The scheduled event data is held in a JSON string in the body field
var eventBody = JSON.parse(event.body)
var eventBody = JSON.parse(event.body);

// Log the event data
console.log("foo = " + eventBody.foo)
console.log("bar = " + eventBody.bar)
console.log("foo = " + eventBody.foo);
console.log("bar = " + eventBody.bar);

// Return a success response
const response = {
statusCode: 200,
headers: { "Content-Type": ["application/json"] },
body: JSON.stringify({message: "Hello from scaleway functions"}),
body: JSON.stringify({ message: "Hello from scaleway functions" }),
};

return response;
Expand Down