From 6c8e516be2a7eb25f4dbb5d9502fff0121ca1bdd Mon Sep 17 00:00:00 2001 From: LGTM Migrator Date: Tue, 8 Nov 2022 08:25:33 +0000 Subject: [PATCH 1/5] Add CodeQL workflow for GitHub code scanning --- .github/workflows/codeql.yml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..0b89ab829 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,42 @@ +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: "25 11 * * 0" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ javascript, java ] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + if: ${{ matrix.language == 'javascript' || matrix.language == 'java' }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ matrix.language }}" From 00ae61b935c5474f03d985b0ed7a527c89e76cb4 Mon Sep 17 00:00:00 2001 From: "K.K. Lamberty" Date: Thu, 11 Jan 2024 16:07:44 -0600 Subject: [PATCH 2/5] Add comment for consistency with intro-to-git lab --- server/settings.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/settings.gradle b/server/settings.gradle index 0e6c57337..e5443ab65 100644 --- a/server/settings.gradle +++ b/server/settings.gradle @@ -6,6 +6,13 @@ * Detailed information about configuring a multi-project build in Gradle can be found * in the user manual at https://docs.gradle.org/5.6/userguide/multi_project_builds.html */ +// This allows us to use the jresolver plugin. If we have +// this plugin in place, we can specify a particular JDK version +// in `build.gradle` and Gradle will download it for us if it's +// not already installed on the system. This will hopefully make +// it easier for people to run the project on a broad range of +// computers without having to worry about installing the right +// JDK version. plugins { id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' From 163c5f52ee683d14f0ea394a165ad32c925980a2 Mon Sep 17 00:00:00 2001 From: "K.K. Lamberty" Date: Thu, 11 Jan 2024 16:17:09 -0600 Subject: [PATCH 3/5] Add the JUnit platform launcher dependency This change was in the PR associated with a similar upgrade, but I don't know if it's behaving the same way because I still see a warning. commit 5552bdcd6783ba50e4c3da70af672604b85ccbec "This eliminates [a Gradle deprecation warning](https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#test_framework_implementation_dependencies) that is introduced by upgrading to Gradle v8.5." --- server/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/build.gradle b/server/build.gradle index 07f36da6e..17dbe77ce 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -46,6 +46,9 @@ dependencies { // JUnit Jupiter Engine for testing. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.1' + // JUnit Platform Launcher for testing. + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + // Mockito for testing testImplementation 'org.mockito:mockito-core:5.8.0' From a56104569e4917a78ab8973c48431b41a1f5af04 Mon Sep 17 00:00:00 2001 From: "K.K. Lamberty" Date: Thu, 11 Jan 2024 16:31:01 -0600 Subject: [PATCH 4/5] Update Java version to 21 The main purpose of this PR is to update Java --- server/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/build.gradle b/server/build.gradle index 17dbe77ce..188c72f41 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -12,10 +12,10 @@ plugins { id 'checkstyle' } -// Build and run the project with Java 11 +// Build and run the project with Java 21 java { toolchain { - languageVersion = JavaLanguageVersion.of(11) + languageVersion = JavaLanguageVersion.of(21) } } From 8a8c7ef7275158a43350bbd0a54657dd2c2828a0 Mon Sep 17 00:00:00 2001 From: "K.K. Lamberty" Date: Thu, 11 Jan 2024 16:35:17 -0600 Subject: [PATCH 5/5] Remove gradle deprecation error This removes a deprecation error caused by how we indicated where the output file should go for the coverage report https://docs.gradle.org/current/userguide/jacoco_plugin.html#sec:jacoco_report_configuration --- server/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/build.gradle b/server/build.gradle index 188c72f41..985ec2bf5 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -78,7 +78,7 @@ jacocoTestReport { // This isn't strictly necessary, but the default reports // location is buried pretty deep in the build directory, // so this makes it easier to find. - html.destination file("${buildDir}/jacocoHtml") + html.outputLocation = file("${buildDir}/jacocoHtml") } afterEvaluate {