wechaty / puppet-official-account

Wechaty Puppet for WeChat Official Account
https://wechaty.js.org/2020/11/06/wechaty-puppet-oa-released-en/
Apache License 2.0
16 stars 7 forks source link

add image-ding-dong feature #5

Closed wj-Mcat closed 3 years ago

wj-Mcat commented 3 years ago

There is a need for juzi, integrating WeChat official account into juzibot. It can say text, but not image. So, this pr gets born.

wj-Mcat commented 3 years ago

According to the test error, linting process can't read envrioment variables.

TAP version 13
# OfficialAccount smoke testing
not ok 1 Error: getOaOptions(): please check your environment variables!
  ---
    operator: error
    expected: |-
      undefined
    actual: |-
      [Error: getOaOptions(): please check your environment variables!]
    at: <anonymous> (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/blue-tape/blue-tape.js:20:20)
    stack: |-
      Error: getOaOptions(): please check your environment variables!
          at Object.getOaOptions (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/tests/fixtures/oa-options.ts:13:11)
          at Test.<anonymous> (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/src/official-account/official-account.spec.ts:26:8)
          at Test.bound [as _cb] (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/tape/lib/test.js:80:32)
          at Test.run (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/blue-tape/blue-tape.js:13:30)
          at Test.bound [as run] (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/tape/lib/test.js:80:32)
          at Immediate.next (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/tape/lib/results.js:83:19)
          at processImmediate (internal/timers.js:456:21)
  ...
# updateAccessToken()
not ok 2 Error: getOaOptions(): please check your environment variables!
  ---
    operator: error
    expected: |-
      undefined
    actual: |-
      [Error: getOaOptions(): please check your environment variables!]
    at: <anonymous> (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/blue-tape/blue-tape.js:20:20)
    stack: |-
      Error: getOaOptions(): please check your environment variables!
          at Object.getOaOptions (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/tests/fixtures/oa-options.ts:13:11)
          at Test.<anonymous> (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/src/official-account/official-account.spec.ts:75:8)
          at Test.bound [as _cb] (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/tape/lib/test.js:80:32)
          at Test.run (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/blue-tape/blue-tape.js:13:30)
          at Test.bound [as run] (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/tape/lib/test.js:80:32)
          at Immediate.next (/home/runner/work/wechaty-puppet-official-account/wechaty-puppet-official-account/node_modules/tape/lib/results.js:83:19)
          at processImmediate (internal/timers.js:456:21)

And it use chatie dynamic server address.

https://github.com/wechaty/wechaty-puppet-official-account/blob/master/src/official-account/official-account.spec.ts#L14-L23

How can I fix this error ?

wj-Mcat commented 3 years ago

I have revert the customized header config and make upload file process passed. But the CI is still red.

wj-Mcat commented 3 years ago

CI can't read envrioment variable correctly. This error still exist after pull latest version from master branch. @huan

huan commented 3 years ago

Thanks for the update!

Let merge it first and keep improving it.