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

DT-587-Update-RI-Make-sure-API-Version-header-returned-for-EBL-is-3.0.0-Beta-1 #512

DT-587-Update-RI-Make-sure-API-Version-header-returned-for-EBL-is-3.0.0-Beta-1

DT-587-Update-RI-Make-sure-API-Version-header-returned-for-EBL-is-3.0.0-Beta-1 #512

Workflow file for this run

name: DCSA-Edocumentation MASTER CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
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 Edocumentation
run: mvn clean -U -B package -Ddcsa.artifacttype=-SNAPSHOT
- name: Build and run the microservices
run: 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_edocumentation || :
exit 1
fi
echo STATUS="$status" >> $GITHUB_OUTPUT
id: healthcheck
- name: Confirm microservice status
if: ${{ steps.healthcheck.outputs.STATUS == 'UP' }}
run: |
echo "The DCSA-Edocumentation service is UP."
- name: Prepare Postman Integration Tests
run: npm install -g newman newman-reporter-htmlextra
- name: Run Postman Integration Tests
run: newman run ./postman_collection.json --insecure --reporters=cli,junit,htmlextra --reporter-junit-export ./newman/TEST-newman-report.xml --reporter-htmlextra-export ./newman/report.html
- name: Output summary to console
run: echo ${{ steps.run-newman.outputs.summary }}
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: JUnit + Newman Tests
path: '**/TEST-*.xml'
reporter: java-junit
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-report
path: newman/report.html