|
| 1 | +name: enterprise plugins tests workflow |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + esdb_repository: |
| 7 | + required: true |
| 8 | + type: string |
| 9 | + |
| 10 | + esdb_version: |
| 11 | + required: true |
| 12 | + type: string |
| 13 | + |
| 14 | + go_version: |
| 15 | + required: true |
| 16 | + type: string |
| 17 | + |
| 18 | +jobs: |
| 19 | + secure: |
| 20 | + name: Secure |
| 21 | + |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + test: [Plugins] |
| 26 | + |
| 27 | + runs-on: ubuntu-latest |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + - uses: actions/setup-go@v5 |
| 31 | + with: |
| 32 | + go-version: ${{ inputs.go_version }} |
| 33 | + |
| 34 | + - name: Login to Cloudsmith |
| 35 | + uses: docker/login-action@v3 |
| 36 | + with: |
| 37 | + registry: docker.eventstore.com |
| 38 | + username: ${{ secrets.CLOUDSMITH_CICD_USER }} |
| 39 | + password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }} |
| 40 | + |
| 41 | + - name: Generate certificates |
| 42 | + run: docker compose --file docker-compose.yml up |
| 43 | + |
| 44 | + - name: Run Go Tests |
| 45 | + run: make ci CI_TARGET=Test${{ matrix.test }} |
| 46 | + |
| 47 | + env: |
| 48 | + EVENTSTORE_DOCKER_REPOSITORY: ${{ inputs.esdb_repository }} |
| 49 | + EVENTSTORE_DOCKER_TAG: ${{ inputs.esdb_version }} |
| 50 | + EVENTSTORE_INSECURE: false |
| 51 | + |
| 52 | + cluster: |
| 53 | + name: Cluster |
| 54 | + |
| 55 | + strategy: |
| 56 | + fail-fast: false |
| 57 | + matrix: |
| 58 | + test: [Plugins] |
| 59 | + |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - uses: actions/checkout@v4 |
| 63 | + - uses: actions/setup-go@v5 |
| 64 | + with: |
| 65 | + go-version: ${{ inputs.go_version }} |
| 66 | + |
| 67 | + - name: Login to Cloudsmith |
| 68 | + uses: docker/login-action@v3 |
| 69 | + with: |
| 70 | + registry: docker.eventstore.com |
| 71 | + username: ${{ secrets.CLOUDSMITH_CICD_USER }} |
| 72 | + password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }} |
| 73 | + |
| 74 | + - name: Set up cluster with Docker Compose |
| 75 | + run: | |
| 76 | + docker compose -f cluster-docker-compose.yml up -d |
| 77 | + env: |
| 78 | + EVENTSTORE_DOCKER_REPOSITORY: ${{ inputs.esdb_repository }} |
| 79 | + EVENTSTORE_DOCKER_TAG: ${{ inputs.esdb_version }} |
| 80 | + |
| 81 | + - name: Run Go Tests |
| 82 | + run: make ci CI_TARGET=Test${{ matrix.test }} |
| 83 | + env: |
| 84 | + EVENTSTORE_INSECURE: false |
| 85 | + CLUSTER: true |
| 86 | + |
| 87 | + - name: Shutdown cluster |
| 88 | + run: docker compose -f cluster-docker-compose.yml down |
| 89 | + if: always() |
0 commit comments