-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.42 KB
/
Copy pathtest.yml
File metadata and controls
56 lines (47 loc) · 1.42 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
name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Run on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Clone the code
uses: actions/checkout@v7
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: Running Tests
run: |
go mod tidy
make test
- name: Running Scaffold Gate
run: make test-scaffold
observability:
name: Alerts and dashboards
runs-on: ubuntu-latest
steps:
- name: Clone the code
uses: actions/checkout@v7
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
# promtool is not part of `make all` so that contributors without it can
# still run everything else. Bump PROMETHEUS_VERSION by hand.
- name: Install promtool
env:
PROMETHEUS_VERSION: "3.14.0"
run: |
mkdir -p "$HOME/.local/bin"
curl -sSfL "https://github.com/prometheus/prometheus/releases/download/v$PROMETHEUS_VERSION/prometheus-$PROMETHEUS_VERSION.linux-amd64.tar.gz" \
| tar -xz --strip-components=1 -C "$HOME/.local/bin" "prometheus-$PROMETHEUS_VERSION.linux-amd64/promtool"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Test alerts
run: make test-alerts
- name: Lint dashboards
run: make lint-dashboards