Add Auth to Second Fhir Server #240
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
tags: | |
- '*.*.*' | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
fhir-data-evaluator-ig: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- name: Install SUSHI | |
run: npm install -g fsh-sushi | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Build | |
working-directory: shorthand/FhirDataEvaluatorIG | |
run: make build | |
- name: Validate Generated Measures | |
working-directory: shorthand/FhirDataEvaluatorIG | |
run: make validate | |
- name: Validate Documentation Measures | |
run: make validate -C shorthand/FhirDataEvaluatorIG RESOURCES_PATH="${GITHUB_WORKSPACE}/Documentation/example-measures/example-measure-*.json" | |
- name: Upload Generated Measures for Integration Test | |
uses: actions/upload-artifact@v4 | |
with: | |
name: generated-resources | |
path: shorthand/FhirDataEvaluatorIG/fsh-generated/resources/Measure-IntegrationTest-Measure-*.json | |
build: | |
needs: fhir-data-evaluator-ig | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Generated Resources | |
uses: actions/download-artifact@v4 | |
with: | |
name: generated-resources | |
path: shorthand/FhirDataEvaluatorIG/fsh-generated/resources | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Build | |
run: mvn -B verify | |
- name: Upload Jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fhir-data-evaluator-jar | |
path: target/fhir-data-evaluator.jar | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and Export to Docker | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: docker/Dockerfile | |
tags: fhir-data-evaluator:latest | |
outputs: type=docker,dest=/tmp/fhir-data-evaluator.tar | |
- name: Upload FhirDataEvaluator Image | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fhir-data-evaluator-image | |
path: /tmp/fhir-data-evaluator.tar | |
integration-test: | |
needs: build | |
strategy: | |
matrix: | |
test: | |
- no-auth | |
- basic-auth | |
- oauth | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install Blazectl | |
run: .github/scripts/install-blazectl.sh | |
- name: Download FhirDataEvaluator Image | |
uses: actions/download-artifact@v4 | |
with: | |
name: fhir-data-evaluator-image | |
path: /tmp | |
- name: Load FhirDataEvaluator Image | |
run: docker load --input /tmp/fhir-data-evaluator.tar | |
- name: Run Blaze and Proxy | |
run: docker compose -f .github/integration-test/${{ matrix.test }}/docker-compose.yml up -d --wait --wait-timeout 300 --scale fhir-data-evaluator=0 | |
- name: Wait for Blaze | |
run: .github/scripts/wait-for-url.sh http://localhost:8082/health | |
- name: Load Data | |
run: .github/integration-test/${{ matrix.test }}/load-data.sh .github/integration-test/test-data | |
- name: Run Integration Test for ICD10 | |
run: .github/integration-test/evaluate-icd10.sh ${{ matrix.test }} | |
- name: Run Integration Test for ICD10 to CSV | |
run: .github/integration-test/evaluate-icd10-to-csv.sh ${{ matrix.test }} | |
- name: Run Integration Test for ICD10 with Status to CSV | |
run: .github/integration-test/evaluate-icd10WithStatus-to-csv.sh ${{ matrix.test }} | |
- name: Run Integration Test for type code | |
run: .github/integration-test/evaluate-code.sh ${{ matrix.test }} | |
- name: Run Integration Test for type boolean | |
run: .github/integration-test/evaluate-exists.sh ${{ matrix.test }} | |
- name: Run Integration Test for Unique Count | |
run: .github/integration-test/evaluate-unique-count.sh ${{ matrix.test }} | |
- name: Run Integration Test for Unique Count with CSV | |
run: .github/integration-test/evaluate-unique-count-to-csv.sh ${{ matrix.test }} | |
- name: Run Integration Test for Unique Count with Components and with CSV | |
run: .github/integration-test/evaluate-unique-count-with-components-to-csv.sh ${{ matrix.test }} | |
- name: Run Integration Test for Reference Resolve | |
run: .github/integration-test/evaluate-reference-resolve.sh ${{ matrix.test }} | |
- name: Run Integration Test to check if it correctly exits when there are insufficient writing permissions | |
run: .github/integration-test/missing-permissions-test.sh | |
- name: Run Integration Test for Posting the MeasureReport to the FHIR server | |
run: .github/integration-test/evaluate-and-post-report.sh ${{ matrix.test }} Test_PROJECT_Evaluation_1 | |
#- name: Run Integration Test for Posting the MeasureReport to the FHIR server with the Same Project Identifier | |
# run: .github/integration-test/evaluate-and-post-update.sh ${{ matrix.test }} Test_PROJECT_Evaluation_1 | |
#- name: Run Integration Test for Posting the MeasureReport to the FHIR server with a Different Project Identifier | |
# run: .github/integration-test/evaluate-and-post-different-doc-ref.sh ${{ matrix.test }} Test_PROJECT_Evaluation_2 | |
- name: Remove Blaze volumes | |
run: docker compose -f .github/integration-test/${{ matrix.test }}/docker-compose.yml down -v | |
- name: Run Blaze with fresh volumes | |
run: docker compose -f .github/integration-test/${{ matrix.test }}/docker-compose.yml up -d | |
- name: Wait for Blaze | |
run: .github/scripts/wait-for-url.sh http://localhost:8082/health | |
- name: Download New Data | |
run: .github/integration-test/test-data/get-mii-testdata.sh | |
- name: Upload New Data | |
run: .github/integration-test/${{ matrix.test }}/load-data.sh .github/integration-test/Vorhofflimmern | |
- name: Run Integration Test multiple stratifiers | |
run: .github/integration-test/evaluate-multiple-stratifiers.sh ${{ matrix.test }} | |
push-image: | |
needs: | |
- build | |
- integration-test | |
runs-on: ubuntu-22.04 | |
if: ${{ ! startsWith(github.head_ref, 'dependabot/')}} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Download Jar | |
uses: actions/download-artifact@v4 | |
with: | |
name: fhir-data-evaluator-jar | |
path: target | |
- name: Download FhirDataEvaluator Image | |
uses: actions/download-artifact@v4 | |
with: | |
name: fhir-data-evaluator-image | |
path: /tmp | |
- name: Load FhirDataEvaluator Image | |
run: docker load --input /tmp/fhir-data-evaluator.tar | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta | |
id: docker-meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
ghcr.io/medizininformatik-initiative/fhir-data-evaluator | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: docker/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.docker-meta.outputs.tags }} | |
labels: ${{ steps.docker-meta.outputs.labels }} |