@@ -80,39 +80,49 @@ jobs:
80
80
name : Integration Tests
81
81
needs : ['config']
82
82
runs-on : ubuntu-latest
83
- container : quay.io/projectquay/golang:${{ matrix.go }}
84
- env :
85
- POSTGRES_CONNECTION_STRING : " host=clair-db port=5432 user=clair dbname=clair sslmode=disable"
86
- RABBITMQ_CONNECTION_STRING : " amqp://guest:guest@clair-rabbitmq:5672/"
87
- STOMP_CONNECTION_STRING : " clair-activemq:61613"
88
83
services :
89
- clair-db :
90
- image : postgres:11.5
84
+ postgres :
85
+ image : docker.io/library/ postgres:11
91
86
env :
92
- POSTGRES_USER : " clair"
93
87
POSTGRES_DB : " clair"
94
88
POSTGRES_INITDB_ARGS : " --no-sync"
89
+ POSTGRES_PASSWORD : password
90
+ POSTGRES_USER : " clair"
95
91
options : >-
96
92
--health-cmd pg_isready
97
93
--health-interval 10s
98
94
--health-timeout 5s
99
95
--health-retries 5
100
- clair-rabbitmq :
101
- image : rabbitmq:3.8.5
96
+ ports :
97
+ - 5432
98
+ rabbitmq :
99
+ image : docker.io/library/rabbitmq:3
102
100
env :
103
- RABBITMQ_VM_MEMORY_HIGH_WATERMARK : " 85%"
104
- clair-activemq :
105
- image : webcenter/activemq:5.14.3
101
+ RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS : ' -rabbit vm_memory_high_watermark 0.85'
102
+ ports :
103
+ - 5672
104
+ - 61613
106
105
107
106
strategy :
108
107
matrix :
109
108
go : ${{ fromJSON(needs.config.outputs.go_versions) }}
110
109
steps :
110
+ - name : Configure RabbitMQ
111
+ run : |
112
+ docker exec ${{ job.services.rabbitmq.id }} rabbitmqctl await_startup
113
+ docker exec ${{ job.services.rabbitmq.id }} rabbitmq-plugins enable rabbitmq_stomp
114
+ docker exec ${{ job.services.rabbitmq.id }} rabbitmq-plugins disable rabbitmq_management_agent rabbitmq_prometheus rabbitmq_web_dispatch
115
+ docker exec ${{ job.services.rabbitmq.id }} rabbitmqctl add_vhost '::1'
116
+ docker exec ${{ job.services.rabbitmq.id }} rabbitmqctl set_permissions -p '::1' guest '.*' '.*' '.*'
111
117
- uses : actions/checkout@v3
112
- - uses : ./.github/ actions/go-cache
118
+ - uses : actions/setup-go@v4
113
119
with :
114
- go : ${{ matrix.go }}
120
+ go-version : ${{ matrix.go }}
115
121
- run : go test -tags integration ./...
122
+ env :
123
+ POSTGRES_CONNECTION_STRING : " host=localhost port=${{ job.services.postgres.ports[5432] }} user=clair dbname=clair password=password sslmode=disable"
124
+ RABBITMQ_CONNECTION_STRING : " amqp://guest:guest@localhost:${{ job.services.rabbitmq.ports[5672] }}/"
125
+ STOMP_CONNECTION_STRING : " stomp://guest:guest@localhost:${{ job.services.rabbitmq.ports[61613] }}/"
116
126
- uses : actions/upload-artifact@v3
117
127
if : failure()
118
128
with :
0 commit comments