-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (34 loc) · 914 Bytes
/
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
name: Docker Compose Pipeline
on:
push:
branches:
- main
- staging
pull_request:
branches:
- main
- staging
jobs:
test:
runs-on: ubuntu-latest
services:
docker:
image: docker:19.03.12
options: --privileged
ports:
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Compose
run: sudo apt-get update && sudo apt-get install docker-compose -y
- name: Build and Run Services
run: docker-compose up --build -d
- name: Wait for services to be ready
run: sleep 10 # this is the estimated service startup time
- name: Run Tests
run: |
curl --fail http://localhost:3000 # Adjust based on the app
# You can add more tests here