Skip to content

Commit

Permalink
test: call venom tests in github-action CI
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Henri Symoneaux <[email protected]>
  • Loading branch information
phsym committed Nov 18, 2024
1 parent cc01eb7 commit 1706c2b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: test

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_call: {}


jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build-env
- run: go build -cover ./cmd/okms
- name: Setup Venom
run: |
wget https://github.com/ovh/venom/releases/download/v1.2.0/venom.linux-amd64
mv venom.linux-amd64 venom
chmod +x venom
- run: |
echo "$CERTIFICATE" > tls.crt
echo "$PRIVATE_KEY" > tls.key
cat > okms.yaml <<-EOF
version: 1
profile: default
profiles:
default: # default profile
http:
auth:
type: mtls
cert: $(pwd)/tls.crt
key: $(pwd)/tls.key
EOF
- run: ./okms keys ls -d
- name: Execute tests
run: make -C tests

6 changes: 6 additions & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
test:
rm -Rf out
../venom run --html-report --output-dir=out --var-from-file cfg/vars.yaml -v .
go tool covdata percent -i out/coverage
go tool covdata textfmt -i out/coverage -o out/coverage.txt
go tool cover -html out/coverage.txt -o out/coverage.html

0 comments on commit 1706c2b

Please sign in to comment.