action.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. name: "e2e"
  2. description: "runs our e2e test suite"
  3. runs:
  4. using: composite
  5. steps:
  6. - name: Configure AWS Credentials
  7. uses: aws-actions/configure-aws-credentials@v1
  8. with:
  9. role-to-assume: ${{ env.AWS_OIDC_ROLE_ARN }}
  10. aws-region: ${{ env.AWS_REGION }}
  11. - name: Setup Go
  12. uses: actions/setup-go@v3
  13. with:
  14. go-version: "${{ env.GO_VERSION }}"
  15. - name: Find the Go Cache
  16. id: go
  17. shell: bash
  18. run: |
  19. echo "build-cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
  20. echo "mod-cache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
  21. - name: Cache the Go Build Cache
  22. uses: actions/cache@v3
  23. with:
  24. path: ${{ steps.go.outputs.build-cache }}
  25. key: ${{ runner.os }}-build-unit-tests-${{ github.sha }}-${{ hashFiles('**/go.sum') }}
  26. restore-keys: ${{ runner.os }}-build-unit-tests-${{ github.sha }}-
  27. - name: Cache Go Dependencies
  28. uses: actions/cache@v3
  29. with:
  30. path: ${{ steps.go.outputs.mod-cache }}
  31. key: ${{ runner.os }}-pkg-${{ github.sha }}-${{ hashFiles('**/go.sum') }}
  32. restore-keys: ${{ runner.os }}-pkg-${{ github.sha }}-
  33. - name: Setup kind
  34. uses: engineerd/setup-kind@v0.5.0
  35. with:
  36. version: ${{ env.KIND_VERSION }}
  37. wait: 10m
  38. image: ${{ env.KIND_IMAGE }}
  39. name: external-secrets
  40. - name: Setup Docker Buildx
  41. uses: docker/setup-buildx-action@v2
  42. with:
  43. version: ${{ env.DOCKER_BUILDX_VERSION }}
  44. install: true
  45. - name: run go mod tidy
  46. shell: bash
  47. run: |
  48. go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
  49. go version
  50. ginkgo version
  51. cd e2e && go mod tidy && git status && git diff
  52. - name: Run e2e Tests
  53. shell: bash
  54. env:
  55. DOCKER_BUILD_ARGS: --load
  56. run: |
  57. export PATH=$PATH:$(go env GOPATH)/bin
  58. go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
  59. make test.e2e