test #3253
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
schedule: | |
- cron: '0 */4 * * *' | |
jobs: | |
test-job: | |
name: run npm test | |
runs-on: ubuntu-latest | |
if: false | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: npm | |
- name: Install dependencies | |
run: npm install --force | |
- name: Run test script | |
run: npm test | |
- name: Send failed message to wx | |
env: | |
WX_PUSHER_TOKEN: ${{ secrets.WX_PUSHER_TOKEN }} | |
WX_PUSHER_UID: ${{ secrets.WX_PUSHER_UID }} | |
WX_PUSHER_APPID: ${{ secrets.WX_PUSHER_APPID }} | |
if: ${{ failure() }} | |
run: | | |
run_no=${{ github.run_number }} | |
run_url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
curl 'https://wxpusher.zjiecode.com/api/send/message' \ | |
-X POST \ | |
-H 'Accept: */*' \ | |
-H 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6' \ | |
-H 'Cache-Control: no-cache' \ | |
-H 'Content-Type: application/json;charset=utf-8' \ | |
-H 'Pragma: no-cache' \ | |
--data-raw '{"appId":"'"$WX_PUSHER_APPID"'","appToken":"'"$WX_PUSHER_TOKEN"'","uids":["'"$WX_PUSHER_UID"'"],"topicIds":[],"url":"'"$run_url"'","summary":"MiniBili测试报错:#'"$run_no"'","content":"<p>#'"$run_no"'测试失败</p>","contentType":2,"verifyPay":false}' \ | |
--compressed |