Skip to content

Commit

Permalink
Add ci report sending to telegram
Browse files Browse the repository at this point in the history
  • Loading branch information
mrognor committed Jan 6, 2025
1 parent 474eda9 commit 1b96be7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .github/TelegramReport/SendCiReportToTelegram.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import sys
import telebot

botTimeWeb = telebot.TeleBot(sys.argv[1])
botTimeWeb.send_message(sys.argv[2], "CI jobs finished!", parse_mode='html', reply_markup=telebot.types.InlineKeyboardMarkup())
11 changes: 11 additions & 0 deletions .github/TelegramReport/SendCiReportToTelegram.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Navigate to root dir
cd $(dirname "$0")
path=$(pwd)

# Create venv
python -m venv env
source $path/env/bin/activate
pip install pyTelegramBotAPI

# Call python scripts
python SendCiReportToTelegram.py $1 $2
39 changes: 21 additions & 18 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,34 @@ jobs:
uses: actions/configure-pages@v5

- name: Install packages
run: sudo apt-get update && sudo apt-get upgrade && sudo DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install doxygen graphviz lcov cmake pipx clang clang-tidy cppcheck
run: sudo apt-get update && sudo apt-get upgrade && sudo DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install doxygen graphviz lcov cmake pipx clang clang-tidy cppcheck python3

- name: Install CodeChecker
run: sudo pipx install CodeChecker --force
# - name: Install CodeChecker
# run: sudo pipx install CodeChecker --force

- name: Create documentation
run: ./Docs/Gendoc.sh
# - name: Create documentation
# run: ./Docs/Gendoc.sh

- name: Run tests
run: ./Scripts/RunTests.sh
# - name: Run tests
# run: ./Scripts/RunTests.sh

- name: Test coverage
run: ./Scripts/TestCoverage.sh
# - name: Test coverage
# run: ./Scripts/TestCoverage.sh

- name: Move coverage artifact
run: mv ./Coverage ./Docs/Generated/html
# - name: Move coverage artifact
# run: mv ./Coverage ./Docs/Generated/html

- name: Run sast
run: ./Scripts/RunSast.sh
# - name: Run sast
# run: ./Scripts/RunSast.sh

- name: Move sast artifacts
run: |
mv ./Sast/html_clang_tidy ./Docs/Generated/html
mv ./Sast/html_clangsa ./Docs/Generated/html
mv ./Sast/html_cppcheck ./Docs/Generated/html
# - name: Move sast artifacts
# run: |
# mv ./Sast/html_clang_tidy ./Docs/Generated/html
# mv ./Sast/html_clangsa ./Docs/Generated/html
# mv ./Sast/html_cppcheck ./Docs/Generated/html

- name: Send report to telegram
run: ./.github/TelegramReport/SendCiReportToTelegram.sh ${{ secrets.BotId }} ${{ secrets.ChatId }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down

0 comments on commit 1b96be7

Please sign in to comment.