INFRA-42544: enable oss scan for security acceptance #132
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: | |
tags: | |
- v*.*.* | |
branches: | |
- main | |
- release/v*.*.* | |
pull_request: | |
branches: | |
- main | |
- release/v*.*.* | |
permissions: | |
contents: read | |
jobs: | |
Test: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.5 | |
- name: Unit Test | |
run: make test | |
E2E: | |
name: E2E | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.5 | |
- name: Setup kustomize | |
uses: imranismail/setup-kustomize@v2 | |
with: | |
kustomize-version: 4.1.3 | |
- name: Start minikube | |
uses: medyagh/setup-minikube@master | |
with: | |
kubernetes-version: v1.22.3 | |
- name: Run Tests | |
run: make e2e | |
- name: Collect logs | |
if: ${{ failure() }} #Only collect logs if e2e tests fail since it will not collect logs in makefile | |
run: | | |
mkdir -p e2e/logs | |
kubectl logs -n vault-plugin-argocd-tokens-testing -l app.kubernetes.io/name=argocd-server > ./e2e/logs/argocd-server.log | |
kubectl logs -n vault-plugin-argocd-tokens-testing vault > ./e2e/logs/vault.log | |
- name: Archive logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: e2e logs | |
path: | | |
e2e/logs | |
- name: Destroy | |
if: ${{ always() }} | |
run: | | |
make destroy | |
minikube stop | |
minikube delete |