action.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. name: "e2e"
  2. description: "runs our e2e test suite"
  3. inputs:
  4. make-target:
  5. description: "Make target to execute (for example: test.e2e or test.e2e.v2)"
  6. required: false
  7. default: "test.e2e"
  8. runs:
  9. using: composite
  10. steps:
  11. - name: Configure AWS Credentials
  12. uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
  13. with:
  14. role-to-assume: ${{ env.AWS_OIDC_ROLE_ARN }}
  15. aws-region: ${{ env.AWS_REGION }}
  16. - name: Setup Go
  17. uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
  18. with:
  19. go-version-file: go.mod
  20. - name: Find the Go Cache
  21. id: go
  22. shell: bash
  23. run: |
  24. echo "build-cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
  25. echo "mod-cache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
  26. - name: Cache the Go Build Cache
  27. uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
  28. with:
  29. path: ${{ steps.go.outputs.build-cache }}
  30. key: ${{ runner.os }}-build-unit-tests-${{ github.sha }}-${{ hashFiles('**/go.sum') }}
  31. restore-keys: ${{ runner.os }}-build-unit-tests-${{ github.sha }}-
  32. - name: Cache Go Dependencies
  33. uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
  34. with:
  35. path: ${{ steps.go.outputs.mod-cache }}
  36. key: ${{ runner.os }}-pkg-${{ github.sha }}-${{ hashFiles('**/go.sum') }}
  37. restore-keys: ${{ runner.os }}-pkg-${{ github.sha }}-
  38. - name: Setup kind
  39. # https://github.com/engineerd/setup-kind/releases/tag/v0.5.0
  40. uses: engineerd/setup-kind@aa272fe2a7309878ffc2a81c56cfe3ef108ae7d0 # v0.5.0
  41. with:
  42. version: ${{ env.KIND_VERSION }}
  43. wait: 10m
  44. image: ${{ env.KIND_IMAGE }}
  45. name: external-secrets
  46. - name: Setup Docker Buildx
  47. # https://github.com/docker/setup-buildx-action/releases/tag/v3.12.0
  48. uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
  49. with:
  50. install: true
  51. - name: Run e2e Tests
  52. shell: bash
  53. env:
  54. DOCKER_BUILD_ARGS: --load
  55. MAKE_TARGET: ${{ inputs.make-target }}
  56. run: |
  57. case "$MAKE_TARGET" in
  58. test.e2e|test.e2e.v2|test.e2e.v2.operational)
  59. make "$MAKE_TARGET"
  60. ;;
  61. *)
  62. echo "unsupported make target: $MAKE_TARGET" >&2
  63. exit 1
  64. ;;
  65. esac