-
Notifications
You must be signed in to change notification settings - Fork 10
57 lines (47 loc) · 1.95 KB
/
Copy pathlive-check-basic.yml
File metadata and controls
57 lines (47 loc) · 1.95 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
48
49
50
51
52
53
54
55
56
57
name: Live Check Basic Example
on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- '.github/workflows/live-check-basic.yml'
- 'basic/**'
permissions:
contents: read
jobs:
live-check-basic:
name: Live Check Basic Example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Rust
uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
- name: Setup Weaver
uses: open-telemetry/weaver/.github/actions/setup-weaver@adcf6fda79c3df1cb537669442aef753b7019777 # v0.24.2
- name: Build basic example
run: make -C basic build
- name: Start live-check
id: live-check
uses: open-telemetry/weaver/.github/actions/weaver-live-check-start@adcf6fda79c3df1cb537669442aef753b7019777 # v0.24.2
with:
registry: ./basic/model
- name: Run basic example
env:
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ steps.live-check.outputs.otlp-grpc-endpoint }}
run: cargo run --manifest-path basic/Cargo.toml -- "Hello, World!"
- name: Stop live-check
id: live-check-stop
if: always()
uses: open-telemetry/weaver/.github/actions/weaver-live-check-stop@adcf6fda79c3df1cb537669442aef753b7019777 # v0.24.2
with:
fail-on: violation
- name: Print live-check result
if: always()
run: |
echo "Weaver live-check result:"
echo " samples: ${{ steps.live-check-stop.outputs.samples }}"
echo " violations: ${{ steps.live-check-stop.outputs.violations }}"
echo " improvements: ${{ steps.live-check-stop.outputs.improvements }}"
echo " information: ${{ steps.live-check-stop.outputs.informations }}"
echo
echo "See the job summary for finding messages and download the weaver-live-check-report artifact for the full JSON report."