Skip to content

Backport changes to STU3 #599

Backport changes to STU3

Backport changes to STU3 #599

name: Integration Tests
on:
workflow_dispatch:
push:
branches:
- 'stu3/master'
pull_request:
jobs:
build:
runs-on: ubuntu-20.04
steps:
-
name: Checkout repo
uses: actions/checkout@v3
-
name: Build the latest Spark Docker image
run: docker build . --file .docker/linux/Spark.Dockerfile
-t sparkfhir/spark:stu3-latest
-
name: Build the latest Mongo Docker image
run: docker build . --file .docker/linux/Mongo.Dockerfile
-t sparkfhir/mongo:stu3-latest
-
name: Run integration tests
run: |
cd tests/integration-tests
mkdir -p logs html_summaries json_results
docker-compose up -d spark
docker-compose run --rm --no-deps plan_executor ./execute_all.sh 'http://spark/fhir' stu3 'html|json|stdout'
docker-compose logs spark > logs/backend.log
-
name: Combine test results
if: ${{ always() }}
run: cd tests/integration-tests && ./combine-test-results.sh json_results annotations.json
-
name: Attach test results
if: github.event_name != 'pull_request'
uses: yuzutech/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
input: tests/integration-tests/annotations.json
-
name: Archive logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: logs-stu3-${{ github.sha }}
path: tests/integration-tests/logs/*.log*
-
name: Archive test reports
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: html_summaries-stu3-${{ github.sha }}
path: tests/integration-tests/html_summaries/**/*.html
-
name: Archive JSON results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: json_results-stu3-${{ github.sha }}
path: tests/integration-tests/json_results/**/*.json
-
name: Archive annotations file
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: annotations-stu3-${{ github.sha }}
path: tests/integration-tests/annotations.json
-
name: Cleanup
if: ${{ always() }}
run: cd tests/integration-tests && docker-compose down