Add Write Permission Check #132
Workflow file for this run
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-latest | |
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 | |
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 | |
run: docker compose -f .github/integration-test/docker-compose.yml up -d | |
- name: Wait for Blaze | |
run: .github/scripts/wait-for-url.sh http://localhost:8082/health | |
- name: Load Data | |
run: blazectl --no-progress --server http://localhost:8082/fhir upload .github/integration-test/test-data | |
- name: Run Integration Test for ICD10 | |
run: .github/integration-test/evaluate-icd10.sh /${PWD}/.github/integration-test/measures/icd10-measure.json | |
- name: Run Integration Test for ICD10 to CSV | |
run: .github/integration-test/evaluate-icd10-to-csv.sh /${PWD}/.github/integration-test/measures/icd10-measure.json | |
- name: Run Integration Test for ICD10 with Status to CSV | |
run: .github/integration-test/evaluate-icd10WithStatus-to-csv.sh /${PWD}/.github/integration-test/measures/icd10withStatus-measure.json | |
- name: Run Integration Test for type code | |
run: .github/integration-test/evaluate-code.sh /${PWD}/.github/integration-test/measures/code-measure.json | |
- name: Run Integration Test for type boolean | |
run: .github/integration-test/evaluate-exists.sh /${PWD}/.github/integration-test/measures/exists-measure.json | |
- name: Run Integration Test for Unique Count | |
run: .github/integration-test/evaluate-unique-count.sh /${PWD}/.github/integration-test/measures/unique-count-measure.json | |
- name: Run Integration Test for Unique Count with CSV | |
run: .github/integration-test/evaluate-unique-count-to-csv.sh /${PWD}/.github/integration-test/measures/unique-count-measure.json | |
- name: Run Integration Test for Unique Count with Components and with CSV | |
run: .github/integration-test/evaluate-unique-count-with-components-to-csv.sh /${PWD}/.github/integration-test/measures/unique-count-with-components-measure.json | |
- name: Run Integration Test to check if it correctly exits when there are insufficient writing permissions | |
run: .github/integration-test/missing-permissions-test.sh | |
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 }} |