generated from Apodini/Template-Repository
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.11 KB
/
docker-compose.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
#
# This source file is part of the Collector-Analyst-Presenter Example open source project
#
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <[email protected]>
#
# SPDX-License-Identifier: MIT
#
name: Build Docker Compose
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
dockercompose:
name: Docker Compose Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Start containers
run: docker-compose -f docker-compose-locally.yml up -d --build
- name: Test web service
run: |
sleep 3
curl --header "Content-Type: application/json" \
--request POST \
--data '{"latitude": 0.0, "longitude": 0.0}' \
--fail \
http://localhost/v1/user/1/locations
curl --fail http://localhost/v1/user/1/hotspots
curl --fail http://localhost/v1/metrics
- name: Stop containers
if: always()
run: docker-compose down