From ee1a75c75aecea7a508178d9bca17446e6fb9030 Mon Sep 17 00:00:00 2001 From: Cecilia Liu Date: Thu, 8 Aug 2024 15:05:26 -0500 Subject: [PATCH 01/10] MAT-7052 add QICore for FHIR type --- .../gov/cms/madie/cql_elm_translator/utils/cql/CQLTools.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/gov/cms/madie/cql_elm_translator/utils/cql/CQLTools.java b/src/main/java/gov/cms/madie/cql_elm_translator/utils/cql/CQLTools.java index f0a18a1..096f65d 100644 --- a/src/main/java/gov/cms/madie/cql_elm_translator/utils/cql/CQLTools.java +++ b/src/main/java/gov/cms/madie/cql_elm_translator/utils/cql/CQLTools.java @@ -130,7 +130,9 @@ public void generate() throws IOException { TranslationResource translationResource = TranslationResource.getInstance( - usingProperties.getLibraryType() == "FHIR"); // <-- BADDDDD!!!! Defaults to fhir + usingProperties.getLibraryType() == "FHIR" + || usingProperties.getLibraryType() + == "QICore"); // <-- BADDDDD!!!! Defaults to fhir CqlPreprocessorVisitor preprocessor = new CqlPreprocessorVisitor( From 758b05f1b197fc77699645793baca713a8a34009 Mon Sep 17 00:00:00 2001 From: Cecilia Liu Date: Fri, 9 Aug 2024 06:28:01 -0500 Subject: [PATCH 02/10] MAT-7052 add publish --- .github/workflows/maven-ci.yml | 58 ++++++++++++++++------------------ 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index ba9fa43..0e87efa 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -1,46 +1,42 @@ -name: Java CI +name: CI -on: - push: - branches: [master, develop] - pull_request: - branches: [master, develop] - - workflow_dispatch: +on: [push] jobs: build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Set up JDK 17 uses: actions/setup-java@v4 with: - distribution: 'corretto' java-version: '17' + distribution: 'adopt' + - name: Build with Maven + run: mvn --batch-mode --update-snapshots verify -# Github Authentication is required to download artifacts from github packages -# A secret is created for this repo, so that github actions can fetch it, the secret is named after GH_PAT_FOR_ACTIONS_TOKEN - - name: maven-settings - uses: s4u/maven-settings-action@v2 + publish-snapshot: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + if: github.ref == 'refs/heads/develop' + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 with: - servers: '[{"id": "github", "username": "madieUser", "password": "${GITHUB_TOKEN_REF}"}]' - githubServer: false + distribution: 'adopt' + java-version: '17' - - name: Build with Maven - run: mvn clean install --file pom.xml - env: - GITHUB_TOKEN_REF: ${{ secrets.GH_PAT_FOR_ACTIONS_TOKEN }} - - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 + - name: Extract project version + run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) + id: project - - name: Cache local Maven repository - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + # publish snapshot iff the project version in pom.xml contains '-SNAPSHOT' + - name: Publish SNAPSHOT version to GitHub Packages + if: contains(steps.project.outputs.version, '-SNAPSHOT') + run: mvn -B --no-transfer-progress deploy -DskipTests + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b2c69ba0a7f71eb3cf0b123b18f532504e55b82d Mon Sep 17 00:00:00 2001 From: Cecilia Liu Date: Mon, 12 Aug 2024 09:46:22 -0500 Subject: [PATCH 03/10] MAT-7052 add settings and change build workflow --- .github/workflows/maven-ci.yml | 7 +++++++ settings.xml | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 settings.xml diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 0e87efa..5383429 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -12,6 +12,13 @@ jobs: with: java-version: '17' distribution: 'adopt' + # Github Authentication is required to download artifacts from github packages + # A secret is created for this repo, so that github actions can fetch it, the secret is named after GH_PAT_FOR_ACTIONS_TOKEN + - name: maven-settings + uses: s4u/maven-settings-action@v2 + with: + servers: '[{"id": "github", "username": "madieUser", "password": "${GITHUB_TOKEN_REF}"}]' + githubServer: false - name: Build with Maven run: mvn --batch-mode --update-snapshots verify diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..fb4bdc6 --- /dev/null +++ b/settings.xml @@ -0,0 +1,36 @@ + + + + github + + + + + github + + + central + https://repo1.maven.org/maven2 + + + github + https://maven.pkg.github.com/MeasureAuthoringTool/madie-rest-commons/ + + true + + + + + + + + + github + ${env.GITHUB_USER} + ${env.GITHUB_TOKEN} + + + From 22c64b918446c006cb4d2bbda52c71a8797cc24f Mon Sep 17 00:00:00 2001 From: Cecilia Liu Date: Mon, 12 Aug 2024 11:56:00 -0500 Subject: [PATCH 04/10] MAT-7052 modify ci for 401 access issue --- .github/workflows/maven-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 5383429..3d78523 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -15,12 +15,12 @@ jobs: # Github Authentication is required to download artifacts from github packages # A secret is created for this repo, so that github actions can fetch it, the secret is named after GH_PAT_FOR_ACTIONS_TOKEN - name: maven-settings - uses: s4u/maven-settings-action@v2 + uses: s4u/maven-settings-action@v4 with: servers: '[{"id": "github", "username": "madieUser", "password": "${GITHUB_TOKEN_REF}"}]' githubServer: false - name: Build with Maven - run: mvn --batch-mode --update-snapshots verify + run: mvn --batch-mode --update-snapshots -s settings.xml package publish-snapshot: needs: build From d14933f9be990d628f3d1c75abf93e78ce95e93b Mon Sep 17 00:00:00 2001 From: Cecilia Liu Date: Mon, 12 Aug 2024 13:12:52 -0500 Subject: [PATCH 05/10] update madie-java-models version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 81ce4c1..8e28194 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 6.1.11 3.4.0 madie-checkstyle.xml - 0.6.49-SNAPSHOT + 0.6.56-SNAPSHOT 2.9.0 From 337b404f0c3d776a584109a831aa45177526e1f8 Mon Sep 17 00:00:00 2001 From: Cecilia Liu Date: Mon, 12 Aug 2024 13:18:12 -0500 Subject: [PATCH 06/10] workflow change --- .github/workflows/maven-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 3d78523..8ebdad2 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -15,7 +15,7 @@ jobs: # Github Authentication is required to download artifacts from github packages # A secret is created for this repo, so that github actions can fetch it, the secret is named after GH_PAT_FOR_ACTIONS_TOKEN - name: maven-settings - uses: s4u/maven-settings-action@v4 + uses: s4u/maven-settings-action@v2 with: servers: '[{"id": "github", "username": "madieUser", "password": "${GITHUB_TOKEN_REF}"}]' githubServer: false From 5887d2cdaa52867145f2d99f62ff62cae7b30a20 Mon Sep 17 00:00:00 2001 From: sb-cecilialiu <97188375+sb-cecilialiu@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:26:18 -0500 Subject: [PATCH 07/10] Update maven-ci.yml --- .github/workflows/maven-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 8ebdad2..79e9c53 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -20,7 +20,9 @@ jobs: servers: '[{"id": "github", "username": "madieUser", "password": "${GITHUB_TOKEN_REF}"}]' githubServer: false - name: Build with Maven - run: mvn --batch-mode --update-snapshots -s settings.xml package + run: mvn clean install --file pom.xml + env: + GITHUB_TOKEN_REF: ${{ secrets.GH_PAT_FOR_ACTIONS_TOKEN }} publish-snapshot: needs: build From ae7880df4c01a6f1140b85b86c06d6895601acfa Mon Sep 17 00:00:00 2001 From: sb-cecilialiu <97188375+sb-cecilialiu@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:35:01 -0500 Subject: [PATCH 08/10] Update maven-ci.yml --- .github/workflows/maven-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 79e9c53..d1b7297 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -20,7 +20,7 @@ jobs: servers: '[{"id": "github", "username": "madieUser", "password": "${GITHUB_TOKEN_REF}"}]' githubServer: false - name: Build with Maven - run: mvn clean install --file pom.xml + run: mvn --batch-mode --update-snapshots -s settings.xml package env: GITHUB_TOKEN_REF: ${{ secrets.GH_PAT_FOR_ACTIONS_TOKEN }} From 7580fa4a3c12c781761ed72c6aec79b0f3db995f Mon Sep 17 00:00:00 2001 From: sb-cecilialiu <97188375+sb-cecilialiu@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:55:58 -0500 Subject: [PATCH 09/10] Update maven-ci.yml --- .github/workflows/maven-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index d1b7297..8ebdad2 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -21,8 +21,6 @@ jobs: githubServer: false - name: Build with Maven run: mvn --batch-mode --update-snapshots -s settings.xml package - env: - GITHUB_TOKEN_REF: ${{ secrets.GH_PAT_FOR_ACTIONS_TOKEN }} publish-snapshot: needs: build From 4bf12c5b4f4dfb715a0dda13d6de8f9b06f75642 Mon Sep 17 00:00:00 2001 From: Cecilia Liu Date: Tue, 13 Aug 2024 09:57:21 -0500 Subject: [PATCH 10/10] change maven ci --- .github/workflows/maven-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 8ebdad2..79e9c53 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -20,7 +20,9 @@ jobs: servers: '[{"id": "github", "username": "madieUser", "password": "${GITHUB_TOKEN_REF}"}]' githubServer: false - name: Build with Maven - run: mvn --batch-mode --update-snapshots -s settings.xml package + run: mvn clean install --file pom.xml + env: + GITHUB_TOKEN_REF: ${{ secrets.GH_PAT_FOR_ACTIONS_TOKEN }} publish-snapshot: needs: build