Skip to content

Commit 7ab7cca

Browse files
committed
Add build-test workflow
1 parent 7c5ac8b commit 7ab7cca

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/test.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: build-test
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
env:
8+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Install packages
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y \
19+
indent
20+
- name: Lint
21+
id: lint
22+
run: make lint
23+
24+
- uses: act10ns/slack@v1
25+
with:
26+
status: ${{ job.status }}
27+
steps: ${{ toJson(steps) }}
28+
if: failure()
29+
30+
build:
31+
needs: test
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Install dependencies
36+
run: |
37+
sudo apt-get update
38+
sudo apt-get -y install \
39+
libjansson-dev \
40+
libcurl4-openssl-dev
41+
- name: Build artifacts
42+
id: build-nagios3
43+
run: |
44+
make nagios3
45+
mv src/alerta-neb.o src/alerta-neb.o.nagios3
46+
- name: Build artifacts
47+
id: build-nagios4
48+
run: |
49+
make nagios4
50+
mv src/alerta-neb.o src/alerta-neb.o.nagios4
51+
- name: Build artifacts
52+
id: build-naemon
53+
run: |
54+
make naemon
55+
mv src/alerta-neb.o src/alerta-neb.o.naemon
56+
57+
- uses: act10ns/slack@v1
58+
with:
59+
status: ${{ job.status }}
60+
steps: ${{ toJson(steps) }}
61+
# if: failure()

0 commit comments

Comments
 (0)