forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.yaml
71 lines (64 loc) · 1.62 KB
/
karma.yaml
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
package:
name: karma
version: "0.120"
description: "A dashboard for managing alerts from Alertmanager"
epoch: 1
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- ca-certificates-bundle
- nodejs
- npm
- wolfi-base
pipeline:
- uses: git-checkout
with:
repository: https://github.com/prymitive/karma.git
tag: v${{package.version}}
expected-commit: 8009f4aa581980654e5c67b26b41e85d9e7ccce0
- name: install-npm-dependencies
working-directory: ui
pipeline:
- runs: |
mkdir -p node_modules/.bin
touch node_modules/.install
npm install --package-lock-only
npm prune --omit=dev
npm ci
cat node_modules/bootstrap/scss/_root.scss | sed s/':root {'/'* {'/ > src/Styles/BootstrapRoot.scss
npm run build
- name: Copy build files
runs: |
cp -r ui/src ./ui/dist ./ui/mock ./ui/embed.go .
- uses: go/build
with:
modroot: cmd/${{package.name}}
packages: .
ldflags: -X main.version=${{package.version}}
output: ${{package.name}}
test:
environment:
contents:
packages:
- curl
pipeline:
- name: Run Karma test
runs: |
karma --version
- name: "Check karma health"
uses: test/daemon-check-output
with:
start: "${{package.name}}"
timeout: 60
expected_output: |
Starting HTTP server
post: |
sleep 3
curl -s http://localhost:8080/health | grep "Pong" || exit 1
update:
enabled: true
github:
identifier: prymitive/karma
strip-prefix: v