leetcode-cli
leetcode-cli copied to clipboard
Add CI for command pick and test
hmmm, need to set the csrf token and session key to the env of CI
This may require loading csrf and session from env
You can set GH Actions secrets, then write those into a config file, and read them. I assume they won't be obtainable from outside. The problem is that they could expire.
yeah, it is possible to replace the new generated csrf and session key with bash script as well!
./target/release/leetcode list # just trigger the config generation logic
sed -i /csrf=\"\"/csrf=\"...\"/ ~/.leetcode/leetcode.toml
sed -i /session=\"\"/session=\"...\"/ ~/.leetcode/leetcode.toml
cp anwser.1-sum-two.rs > ~/.leetcode/code
leetcode t 1