-
Notifications
You must be signed in to change notification settings - Fork 23
137 lines (111 loc) · 3.47 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: tests workflow
on:
workflow_call:
inputs:
runtime_env:
type: string
default: release
esdb_version:
required: true
type: string
jobs:
provide_docker:
uses: ./.github/workflows/docker-repo.yml
with:
runtime_env: ${{ inputs.runtime_env }}
single_node:
needs: provide_docker
name: Single node
strategy:
fail-fast: false
matrix:
test: [Streams, PersistentSubscriptions, Telemetry]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4
- name: Execute Gradle build
run: ./gradlew ci --tests ${{ matrix.test }}Tests
env:
EVENTSTORE_DOCKER_REGISTRY_ENV: docker.eventstore.com
EVENTSTORE_DOCKER_IMAGE_ENV: ${{ needs.provide_docker.outputs.docker_repo }}/${{ needs.provide_docker.outputs.docker_container }}
EVENTSTORE_DOCKER_TAG_ENV: ${{ inputs.esdb_version }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: esdb_logs.tar.gz
path: /tmp/esdb_logs.tar.gz
if-no-files-found: error
secure:
needs: provide_docker
name: Secure
strategy:
fail-fast: false
matrix:
test: [Streams, PersistentSubscriptions]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate certificates
run: docker compose --file configure-tls-for-tests.yml up
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4
- name: Execute Gradle build
run: ./gradlew ci --tests ${{ matrix.test }}Tests
env:
EVENTSTORE_DOCKER_REGISTRY_ENV: docker.eventstore.com
EVENTSTORE_DOCKER_IMAGE_ENV: ${{ needs.provide_docker.outputs.docker_repo }}/${{ needs.provide_docker.outputs.docker_container }}
EVENTSTORE_DOCKER_TAG_ENV: ${{ inputs.esdb_version }}
SECURE: true
- uses: actions/upload-artifact@v3
if: failure()
with:
name: esdb_logs.tar.gz
path: /tmp/esdb_logs.tar.gz
cluster:
needs: provide_docker
name: Cluster
strategy:
fail-fast: false
matrix:
test: [Streams, PersistentSubscriptions]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up cluster with Docker Compose
run: docker compose up -d
env:
CONTAINER_REGISTRY: docker.eventstore.com
CONTAINER_IMAGE: ${{ needs.provide_docker.outputs.docker_repo }}/${{ needs.provide_docker.outputs.docker_container }}
CONTAINER_IMAGE_VERSION: ${{ inputs.esdb_version }}
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4
- name: Execute Gradle build
run: ./gradlew ci --tests ${{ matrix.test }}Tests
env:
CLUSTER: true
SECURE: true
- name: Shutdown cluster
run: docker compose down