mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 13:22:57 +00:00
* feat: add description for each grafana panel * Apply suggestions from code review Co-authored-by: Yingwen <realevenyag@gmail.com> * fix: unit of write stall * feat: add jq script to summary the grafana dashboard * fix: update description * ci: add ci step to valid grafana and send summary as comment * ci: update check * ci: update ci --------- Co-authored-by: Yingwen <realevenyag@gmail.com>
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: Check Grafana Panels
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'grafana/**' # Trigger only when files under the grafana/ directory change
|
|
|
|
jobs:
|
|
check-panels:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# Check out the repository
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
# Install jq (required for the script)
|
|
- name: Install jq
|
|
run: sudo apt-get install -y jq
|
|
|
|
# Make the check.sh script executable
|
|
- name: Make check.sh executable
|
|
run: chmod +x grafana/check.sh
|
|
|
|
# Run the check.sh script
|
|
- name: Run check.sh
|
|
run: ./grafana/check.sh
|
|
|
|
# Only run summary.sh for pull_request events (not for merge queues or final pushes)
|
|
- name: Check if this is a pull request
|
|
id: check-pr
|
|
run: |
|
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
|
echo "is_pull_request=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "is_pull_request=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
# Make the summary.sh script executable
|
|
- name: Make summary.sh executable
|
|
if: steps.check-pr.outputs.is_pull_request == 'true'
|
|
run: chmod +x grafana/summary.sh
|
|
|
|
# Run the summary.sh script and add its output to the GitHub Job Summary
|
|
- name: Run summary.sh and add to Job Summary
|
|
if: steps.check-pr.outputs.is_pull_request == 'true'
|
|
run: |
|
|
SUMMARY=$(./grafana/summary.sh)
|
|
echo "### Summary of Grafana Panels" >> $GITHUB_STEP_SUMMARY
|
|
echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY
|