-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bao Zhiyuan
committed
May 11, 2024
0 parents
commit 90a08d4
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 2 * * *' | ||
|
||
jobs: | ||
simple-use: | ||
runs-on: macos-latest | ||
env: | ||
WECOM_ROBOT_KEY: ${{ secrets.WECOM_ROBOT_KEY }} | ||
steps: | ||
- name: install | ||
run: | | ||
/bin/bash -c "$(curl -fsSL https://cli.moonbitlang.com/bleeding/mac_m1_moon_setup.sh)" | ||
echo "$HOME/.moon/bin" >> $GITHUB_PATH | ||
- name: moon version | ||
run: | | ||
moon version --all | ||
moonrun --version | ||
- name: update mooncakes registry | ||
run: moon update | ||
|
||
- name: simple use | ||
run: | | ||
moon new hello | ||
cd hello | ||
moon add bzy-debug/hello | ||
moon run main | ||
- name: notify on fail | ||
if: ${{ failure() }} | ||
run: | | ||
curl "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=$WECOM_ROBOT_KEY" \ | ||
-H 'Content-Type: application/json' \ | ||
-d @- <<REQUEST_BODY | ||
{ | ||
"msgtype": "text", | ||
"text": { | ||
"content": "🤣 bleeding daily ci failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
} | ||
} | ||
REQUEST_BODY |