From e1d50218facfec6ffcba0186b82b0d033b2e4350 Mon Sep 17 00:00:00 2001 From: Till Englert Date: Mon, 30 Sep 2024 10:58:51 +0200 Subject: [PATCH] Compability with latest stable: nextflow:v24.04.4 --- .github/workflows/build.yml | 10 +++++----- Makefile | 7 +++++++ .../co2footprint/CO2FootprintDslTest.groovy | 15 +++++++++++++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 939121b..8b35a52 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,23 +17,24 @@ jobs: strategy: fail-fast: false matrix: - java_version: [8, 11] + java_version: [11, 21] steps: - name: Environment run: env | sort - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: fetch-depth: 1 submodules: true - name: Setup Java ${{ matrix.java_version }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{matrix.java_version}} architecture: x64 + distribution: 'temurin' - name: Compile run: ./gradlew assemble @@ -41,5 +42,4 @@ jobs: - name: Tests run: ./gradlew check env: - GRADLE_OPTS: '-Dorg.gradle.daemon=false' - + GRADLE_OPTS: '-Dorg.gradle.daemon=false' \ No newline at end of file diff --git a/Makefile b/Makefile index e6fdc54..de439a7 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,10 @@ NXF_HOME ?= $$HOME/.nextflow NXF_PLUGINS_DIR ?= $(NXF_HOME)/plugins clean: + rm -rf .nextflow* + rm -rf work + rm -rf build + rm -rf plugins/*/build ./gradlew clean compile: @@ -48,6 +52,9 @@ else ./gradlew ${mm}test --tests ${class} endif +assemble: + ./gradlew assemble + install: ./gradlew copyPluginZip rm -rf ${NXF_PLUGINS_DIR}/nf-co2footprint-${version} diff --git a/plugins/nf-co2footprint/src/test/nextflow/co2footprint/CO2FootprintDslTest.groovy b/plugins/nf-co2footprint/src/test/nextflow/co2footprint/CO2FootprintDslTest.groovy index d0d1dcd..943130e 100644 --- a/plugins/nf-co2footprint/src/test/nextflow/co2footprint/CO2FootprintDslTest.groovy +++ b/plugins/nf-co2footprint/src/test/nextflow/co2footprint/CO2FootprintDslTest.groovy @@ -1,5 +1,8 @@ package nextflow.co2footprint +import java.nio.file.Files +import java.util.jar.Manifest + import nextflow.Channel import nextflow.plugin.Plugins import nextflow.plugin.TestPluginDescriptorFinder @@ -36,8 +39,16 @@ class CO2FootprintDslTest extends Dsl2Spec{ protected PluginDescriptorFinder createPluginDescriptorFinder() { return new TestPluginDescriptorFinder(){ @Override - protected Path getManifestPath(Path pluginPath) { - return pluginPath.resolve('build/resources/main/META-INF/MANIFEST.MF') + protected Manifest readManifestFromDirectory(Path pluginPath) { + if( !Files.isDirectory(pluginPath) ) + return null + + final manifestPath = pluginPath.resolve('build/resources/main/META-INF/MANIFEST.MF') + if( !Files.exists(manifestPath) ) + return null + + final input = Files.newInputStream(manifestPath) + return new Manifest(input) } } }