-
Notifications
You must be signed in to change notification settings - Fork 136
48 lines (42 loc) · 1.14 KB
/
build-test.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
name: 🔨 Build Test
on:
pull_request:
workflow_dispatch:
jobs:
build:
name: Test Builds
runs-on: ubuntu-latest
services:
gotify:
image: ghcr.io/gotify/server
ports:
- 80:80
options: >-
-v /var/gotify/data:/app/data
--name gotify
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Test
run: go test .
working-directory: cmd/notify/
- name: Build
run: go build .
working-directory: cmd/notify/
- name: Integration Tests
env:
DISCORD_WEBHOOK_URL: "${{ secrets.DISCORD_WEBHOOK_URL }}"
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
CUSTOM_WEBHOOK_URL: "${{ secrets.CUSTOM_WEBHOOK_URL }}"
run: |
if [ "$GITHUB_ACTOR" == "dependabot[bot]" ]; then
export DEPENDABOT=true
fi
chmod +x gotify.sh
chmod +x action-run.sh
bash action-run.sh
working-directory: cmd/integration-test/