test: Add venom test-suites #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "${{secrets.CERTIFICATE}}" > tls.crt | |
echo "${{secrets.PRIVATE_KEY}}" > tls.key | |
cat > okms.yaml <<-EOF | |
version: 1 | |
profile: default | |
profiles: | |
default: # default profile | |
http: | |
endpoint: ${{secrets.KMS_HTTP_ENDPOINT}} | |
auth: | |
type: mtls | |
cert: $(pwd)/tls.crt | |
key: $(pwd)/tls.key | |
EOF | |
- run: ./okms keys ls -d -c okms.yaml | |
continue-on-error: true | |
- name: Execute tests | |
run: make -C tests | |