forked from samagra-comms/transport-socket
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.25 KB
/
docker-build.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
name: Docker Build
on:
workflow_dispatch:
input:
tags:
description: 'Test scenario tags'
required: true
type: boolean
push:
branches: [master, uci-pwa]
pull_request:
branches: [master, uci-pwa]
jobs:
build:
runs-on: ubuntu-20.04
env:
REDIS_HOST: 0.0.0.0
REDIS_PORT: 6380
SERVER_PORT: 3005
ADAPTER_URL: "http://143.110.255.220:8080/pwa/web"
timeout-minutes: 40
steps:
- run: curl --version
- uses: actions/checkout@v2
- run: env
- name: Build container image
run: docker build -t test-container-image .
- name: Start Redis
run: docker run --name enketo-redis-cache -p 6380:6379 -d redis
timeout-minutes: 5
- name: Launch container
run: docker run --name test-container -dp 3005:3005 test-container-image
timeout-minutes: 5
- run: docker ps
# - name: Sleep for 100s
# uses: juliangruber/sleep-action@v1
# with:
# time: 100s
- run: docker logs test-container
# - run: curl -s 0.0.0.0:3005/health
# - name: Wait for Service to start
# run: while ! curl -s 0.0.0.0:3005/health; do sleep 1; done
# timeout-minutes: 1
- name: Check API health
run: curl -s 0.0.0.0:3005/health