Skip to content

Commit

Permalink
[#1] add test framework
Browse files Browse the repository at this point in the history
  • Loading branch information
feelform committed Sep 30, 2021
1 parent b8c7370 commit 3243da6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/actions/modules-updater-action/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
const core = require('@actions/core');
const github = require('@actions/github');
/**
* Pinpoint gitbook template engine
* Copyright 2021-present NAVER Corp.
* Apache License v2.0
*/

'use strict'

const core = require('@actions/core')
const github = require('@actions/github')

try {
// `who-to-greet` input defined in action metadata file
const nameToGreet = core.getInput('who-to-greet');
console.log(`Hello ${nameToGreet}!`);
const time = (new Date()).toTimeString();
core.setOutput("time", time);
const templateMarkdownFile = core.getInput('template-markdown-file')
console.log(`Hello ${templateMarkdownFile}!`)
const time = (new Date()).toTimeString()
core.setOutput("time", time)
// Get the JSON webhook payload for the event that triggered the workflow
const payload = JSON.stringify(github.context.payload, undefined, 2)
console.log(`The event payload: ${payload}`);
console.log(`The event payload: ${payload}`)
} catch (error) {
core.setFailed(error.message);
core.setFailed(error.message)
}
7 changes: 7 additions & 0 deletions .github/actions/modules-updater-action/test/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Pinpoint gitbook template engine
* Copyright 2021-present NAVER Corp.
* Apache License v2.0
*/

'use strict'

0 comments on commit 3243da6

Please sign in to comment.