-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (84 loc) · 2.28 KB
/
tests.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Tests
on:
pull_request:
branches: ["**"]
push:
branches:
- main
jobs:
install-tools:
if: "!contains(github.event.head_commit.message, 'Merge pull request')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install all tools
run: make tools
- uses: actions/upload-artifact@v4
with:
name: tools
path: bin/
benthos-test:
needs: install-tools
if: "!contains(github.event.head_commit.message, 'Merge pull request')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: actions/download-artifact@v4
with:
name: tools
path: bin/
- name: Set executable
run: chmod +x bin/*
- name: Run Benthos tests
run: make test-benthos
go-tests:
needs: install-tools
if: "!contains(github.event.head_commit.message, 'Merge pull request')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: actions/download-artifact@v4
with:
name: tools
path: bin/
- name: Set executable
run: chmod +x bin/*
- name: Run Go tests
run: go test ./...
prometheus-alerts:
needs: install-tools
if: "!contains(github.event.head_commit.message, 'Merge pull request')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: tools
path: bin/
- name: Set executable
run: chmod +x bin/*
- name: Run Prometheus alert tests
run: make test-prometheus-alerts
prometheus-rules:
needs: install-tools
if: "!contains(github.event.head_commit.message, 'Merge pull request')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: tools
path: bin/
- name: Set executable
run: chmod +x bin/*
- name: Run Prometheus rules tests
run: make test-prometheus-rules