Skip to content

Commit c0193f4

Browse files
committed
test: call venom tests in github-action CI
Signed-off-by: Pierre-Henri Symoneaux <[email protected]>
1 parent 298e2f6 commit c0193f4

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
workflow_call: {}
9+
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: ./.github/actions/setup-build-env
17+
- run: go build -cover ./cmd/okms
18+
- name: Setup Venom
19+
run: |
20+
wget https://github.com/ovh/venom/releases/download/v1.2.0/venom.linux-amd64
21+
mv venom.linux-amd64 venom
22+
chmod +x venom
23+
- run: |
24+
echo "$CERTIFICATE" > tls.crt
25+
echo "$PRIVATE_KEY" > tls.key
26+
27+
cat > okms.yaml <<-EOF
28+
version: 1
29+
profile: default
30+
profiles:
31+
default: # default profile
32+
http:
33+
auth:
34+
type: mtls
35+
cert: $(pwd)/tls.crt
36+
key: $(pwd)/tls.key
37+
EOF
38+
- run: ./okms keys ls -d
39+
- name: Execute tests
40+
run: make -C tests
41+

tests/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
test:
2+
rm -Rf out
3+
../venom run --html-report --output-dir=out --var-from-file cfg/vars.yaml -v .
4+
go tool covdata percent -i out/coverage
5+
go tool covdata textfmt -i out/coverage -o out/coverage.txt
6+
go tool cover -html out/coverage.txt -o out/coverage.html

0 commit comments

Comments
 (0)