-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1.21 KB
/
docker-test.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
name: test Docker Compose deployment
on:
push:
branches: [ main ]
workflow_dispatch:
schedule: # Run daily at midnight
- cron: '0 0 * * *'
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Docker Compose
uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: '2.14.2'
- name: Start Docker containers
run: docker-compose -f ./docker-compose/docker-compose.yaml up -d
working-directory: ${{ github.workspace }}
- name: Wait for services to boot
run: sleep 120s
- name: Test endpoint 7001
run: curl -s http://localhost:7001
id: test_7001
- name: Test endpoint 7002
run: curl -s http://localhost:7002
id: test_7002
- name: Test endpoint 7003
run: curl -s http://localhost:7003
id: test_7003
- name: Check endpoint results
run: |
echo "Endpoint 7001 status: ${{ steps.test_7001.outputs.stdout }}"
echo "Endpoint 7002 status: ${{ steps.test_7002.outputs.stdout }}"
echo "Endpoint 7003 status: ${{ steps.test_7003.outputs.stdout }}"