tonyfettes / coc-rime

Rime input method source for coc.nvim
https://www.npmjs.com/package/coc-rime
MIT License
30 stars 2 forks source link

Add a GitHub Action to run tests on code changes #7

Closed cclauss closed 7 months ago

cclauss commented 7 months ago

https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

Test results: https://github.com/cclauss/coc-rime/actions

@Freed-Wu

Freed-Wu commented 7 months ago

Can you squash commits?

cclauss commented 7 months ago

You can Squash and merge

image
Freed-Wu commented 7 months ago

I found npm build will failed due to:

node-gyp build

I try node-gyp configure then make find the error comes from:

g++ -o Release/rime_cli -pthread -rdynamic -m64 -lrime -ljson-c -Wl,--start-group ./Release/obj.target/rime_cli/rime-cli.o -lnode -Wl,--end-group

The order should be

g++ -o Release/rime_cli -pthread -rdynamic -m64 -Wl,--start-group ./Release/obj.target/rime_cli/rime-cli.o -lnode -Wl,--end-group -lrime -ljson-c
cclauss commented 7 months ago

warning coc-rime@0.1.3-alpha: The engine "coc" appears to be invalid.

Freed-Wu commented 7 months ago

Don't worry. https://github.com/neoclide/coc.nvim is a valid js engine.

Freed-Wu commented 7 months ago

CI/CD have been passed.

https://github.com/cclauss/coc-rime/actions/runs/8464133396

Freed-Wu commented 7 months ago

https://github.com/tonyfettes/coc-rime/blob/master/.github/workflows/main.yml#L40 need a secret named NODE_AUTH_TOKEN.

@tonyfettes Can you add you npm token to github secret? It should be in your ~/.npmrc like

//registry.npmjs.org/:_authToken=npm_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

where npm_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is NODE_AUTH_TOKEN.

cclauss commented 7 months ago

Nice work @Freed-Wu 👍

Now, is it possible to create another (separate!) GitHub Action that fails raising gyp: Undefined variable android_ndk_path