Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Towards v1.0 beta1 #127

Towards v1.0 beta1

Towards v1.0 beta1 #127

Workflow file for this run

name: DCSA-EBL-Envelope MASTER CI
on:
push:
branches:
- master
- next-phase
pull_request:
branches:
- master
- next-phase
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: DCSA-EBL-Envelope
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@v12
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 EBL Envelope
run: cd DCSA-EBL-Envelope && mvn clean -U -B package -Ddcsa.artifacttype=-SNAPSHOT failsafe:integration-test
- name: Build and run the microservices
run: cd DCSA-EBL-Envelope && docker-compose -f docker-compose.yml up -d -V --build
- name: Fetch Backend Status
run: |
sleep 10
status=$(curl -k -s https://localhost:8443/v1/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 -k -s https://localhost:8443/v1/actuator/health | jq -r '.status')
done
echo "Final status is '$status'"
if [[ "$status" != "UP" ]]; then
curl -k -v https://localhost:8443/v1/actuator/health || :
docker ps || :
docker logs dcsa-ebl-envelope-dcsa-ec-service-1 || :
exit 1
fi
echo "::set-output name=STATUS::$status"
id: healthcheck
- name: Confirm microservice status
if: ${{ steps.healthcheck.outputs.STATUS == 'UP' }}
run: |
echo "The DCSA-EBL-Envelope service is UP."
- name: Run API Tests
id: run-newman
uses: anthonyvscode/newman-action@v1
with:
collection: DCSA-EBL-Envelope/postman_collection.json
reporters: cli
insecure: true
- name: Output summary to console
run: echo ${{ steps.run-newman.outputs.summary }}