-
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.16 KB
/
ci-runner.yml
File metadata and controls
47 lines (40 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: CI Runner
on:
push:
branches: [main]
paths:
- 'src/**'
- 'build.zig'
workflow_dispatch:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
version: 0.15.2
- name: Build
run: zig build -Dci=true --summary all
- name: Test
run: zig build test -Dci=true --summary all
- name: Telegram notify
if: failure()
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-d chat_id="${TELEGRAM_CHAT_ID}" \
-d text="❌ CI FAILED on main: ${GITHUB_SHA::8} — ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" \
-d parse_mode="HTML"
- name: Upload CI status
if: always()
uses: actions/upload-artifact@v4
with:
name: ci-status
path: zig-out/
retention-days: 7