Repository navigation
69 lines (58 loc) · 2.23 KB
/
Copy pathmaster.yml
File metadata and controls
69 lines (58 loc) · 2.23 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: DCSA-Reefer MASTER CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: DCSA-Reefer-Commercial
submodules: recursive
- name: Set up Java JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v20
with:
repositories: '[{ "id": "github", "name": "DCSA Backend repo", "url": "https://maven.pkg.github.com/dcsaorg/DCSA-Core", "releases": { "enabled": "true" }, "snapshots": { "enabled": "true" } }]'
servers: '[{ "id": "github", "username": "${{ secrets.DCSA_USER }}", "password": "${{ secrets.DCSA_PACKAGES_PAT }}" }]'
- name: Build Reefer-Commercial
run: cd DCSA-Reefer-Commercial && mvn clean -U -B package -Ddcsa.artifacttype=-SNAPSHOT
- name: Build and run the microservices
run: cd DCSA-Reefer-Commercial && docker-compose -f docker-compose.yml --env-file=.github/.env up -d -V --build
- name: Fetch Backend Status
run: |
sleep 10
status=$(curl -s http://localhost:9090/actuator/health | jq -r '.status')
retries=12
while [[ "$status" != "UP" ]] && [[ $retries -gt 0 ]]; do
echo "Status is '$status' - waiting 5 secs ($retries retries left)"
sleep 5
retries=$((retries - 1))
status=$(curl -s http://localhost:9090/actuator/health | jq -r '.status')
done
echo "Final status is '$status'"
if [[ "$status" != "UP" ]]; then
curl -v http://localhost:9090/actuator/health || :
docker ps || :
docker logs dcsa_reefer_commercial || :
exit 1
fi
- name: Run Postman Integration Tests
id: run-newman
uses: anthonyvscode/newman-action@v1
with:
collection: DCSA-Reefer-Commercial/postman-collection.json
reporters: cli
insecure: true
- name: Output summary to console
run: echo ${{ steps.run-newman.outputs.summary }}