diff --git a/index.test.js b/index.test.js new file mode 100644 index 00000000..17018fb1 --- /dev/null +++ b/index.test.js @@ -0,0 +1,25 @@ +const cp = require('child_process'); +const path = require('path'); + +describe.skip('DDNS: Integration tests', () => { + test('test runs', () => { + const ip = path.join(__dirname, 'index.js'); + console.log(ip) + try { + cp.execSync(`node ${ip}`, { + env: { + INPUT_MNEMONIC: process.env.DEV_PKEY, + INPUT_RPC: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`, + INPUT_NAME: 'ddns-action.eth', + INPUT_CONTENTTYPE: 'ipfs-ns', + INPUT_CONTENTHASH: 'QmWXBwcDSyDuiJhG4JAgJY7GBVbC6puyHQge1WD6rqv9nY', + INPUT_DRYRUN: false, + INPUT_VERBOSE: true + }, + stdio: 'inherit' + }); + } catch { + fail(); + } + }); +}); \ No newline at end of file diff --git a/runner.js b/runner.js index 9470ea75..a57ccd11 100644 --- a/runner.js +++ b/runner.js @@ -10,7 +10,7 @@ async function run() { const name = core.getInput('name'); const contentHash = core.getInput('contentHash'); const contentType = core.getInput('contentType'); - const dryrun = core.getInput('dryRun'); + const dryrun = (core.getInput('dryRun') === 'true'); const verbose = (core.getInput('verbose') === 'true'); await updater.update({ mnemonic, rpc, name, contentHash, contentType, dryrun, verbose })