Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version of dependencies, fix build errors, address bit rot #73

Merged
merged 15 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build
on:
push:
branches:
- master

permissions:
contents: write
checks: write

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
maven:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish snapshot
run: ./mvnw --batch-mode -no-transfer-progress --update-snapshots deploy -Ppackage
env:
MAVEN_USERNAME: ${{ vars.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Publish test report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: "**/target/surefire-reports/TEST-*.xml"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
42 changes: 34 additions & 8 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
name: Check PR
on: pull_request
on:
pull_request:
types: [opened, reopened, synchronize]

permissions:
checks: write

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
maven:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Compile
run: ./mvnw --batch-mode --no-transfer-progress --update-snapshots -T 4 package -DskipTests=true
- name: Tests and additional checks
run: ./mvnw --batch-mode --no-transfer-progress -T 4 verify -Ppackage
- name: Publish test report
uses: mikepenz/action-junit-report@v4
if: (success() || failure()) && matrix.os == 'ubuntu-latest'
with:
distribution: temurin
java-version: 11
- name: Run Checks
run: mvn --batch-mode --no-transfer-progress --update-snapshots verify
report_paths: "**/target/surefire-reports/TEST-*.xml"
job_name: "Check PR"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: matrix.os == 'ubuntu-latest'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
23 changes: 0 additions & 23 deletions .github/workflows/publish-snapshot.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/spotless.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Format Check

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
spotless:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: spotless:check
run: ./mvnw spotless:check
- uses: mshick/add-pr-comment@v2
if: always()
with:
message-success: |
Formatting check succeeded!
message-failure: |
**This Pull Request has failed the formatting check**

Please run `mvnw spotless:apply` or `mvnw clean install -DskipTests` to fix the formatting issues.
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
3 changes: 0 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"vscjava.vscode-java-pack",
"editorconfig.editorconfig",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-scientific-terms",
"streetsidesoftware.code-spell-checker-medical-terms",
"shengchen.vscode-checkstyle",
"sonarsource.sonarlint-vscode",
"redhat.fabric8-analytics"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
Expand Down
9 changes: 8 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Main",
"request": "launch",
"mainClass": "org.opencds.cqf.cql.debug.service.Main",
"projectName": "cql-debug-service"
},
{
"type": "java",
"name": "Launch Main w/ Plugin",
"request": "launch",
"mainClass": "org.opencds.cqf.cql.ls.service.Main",
"projectName": "cql-ls-plugin-debug",
"projectName": "cql-ls-plugin-debug"
},
{
"type": "java",
Expand Down
9 changes: 1 addition & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
".idea": true,
},
"java.configuration.updateBuildConfiguration": "automatic",
"editor.formatOnSave": true,
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
Expand All @@ -24,10 +19,8 @@
"hamcrest",
"opencds",
"testng",
"Ucum",
"Unregistration"
],
"formatAll.includeFileExtensions": [
".java"
],
"java.compile.nullAnalysis.mode": "automatic"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Build the project with:
mvn package
```

The language server itself is designed to be used by IDE plugins, such as the [CQL Support for VS Code]([https://atom.io/packages/language-cql](https://marketplace.visualstudio.com/items?itemName=cqframework.cql)) package.
The language server itself is designed to be used by IDE plugins, such as the [CQL Support for VS Code](<[https://atom.io/packages/language-cql](https://marketplace.visualstudio.com/items?itemName=cqframework.cql)>) package.

## Getting Help

Expand Down Expand Up @@ -42,7 +42,7 @@ Merges to `master` trigger a deployment to the Maven Snapshots repositories. Onc

## License

Copyright 2019+ Dynamic Content Group, LLC (dba Alphora)
Copyright 2019+ Smile Digital Health

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
25 changes: 2 additions & 23 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

Expand All @@ -18,27 +19,5 @@
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr</artifactId>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-jaxb</artifactId>
<type>pom</type>
</dependency>

<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>3.1.1</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ default InputStream read(URI root, VersionedIdentifier identifier) {
}

if (locations.size() > 1) {
String allLocations = String.join("%n",
locations.stream().map(String::valueOf).collect(Collectors.toList()));
String allLocations =
String.join("%n", locations.stream().map(String::valueOf).collect(Collectors.toList()));
throw new IllegalStateException(String.format(
"more than one location was found for library: %s version: %s in the current workspace:%n%s",
identifier.getId(), identifier.getVersion(), allLocations));
Expand Down
Loading
Loading