From 4dfa9e318cab3cd2ce5b08e8ae5d7eda17c2638d Mon Sep 17 00:00:00 2001 From: panax Date: Fri, 5 Jul 2024 14:53:00 +0200 Subject: [PATCH 1/2] [build] ci: :construction_worker: add ci --- .github/workflows/build.yml | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..cdeb5ac --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: nf-kafka CI +on: + push: + branches: + - '*' + tags-ignore: + - '*' + pull_request: + branches: + - '*' +jobs: + build: + name: Build nf-kafka + if: "!contains(github.event.head_commit.message, '[ci skip]')" + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + java_version: [11, 17] + + steps: + - name: Environment + run: env | sort + + - name: Checkout + uses: actions/checkout@v1 + with: + fetch-depth: 1 + submodules: true + + - name: Setup Java ${{ matrix.java_version }} + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java_version}} + architecture: x64 + distribution: 'temurin' + + - name: Compile + run: ./gradlew assemble + + - name: Tests + run: ./gradlew check + env: + GRADLE_OPTS: '-Dorg.gradle.daemon=false' \ No newline at end of file From ffe01608978cdf845a2768140cd38ee05b1d27c1 Mon Sep 17 00:00:00 2001 From: panax Date: Fri, 5 Jul 2024 15:25:25 +0200 Subject: [PATCH 2/2] [build] test: :white_check_mark: fix failing test --- plugins/nf-kafka/src/test/nextflow/events/DslTest.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/nf-kafka/src/test/nextflow/events/DslTest.groovy b/plugins/nf-kafka/src/test/nextflow/events/DslTest.groovy index 8bf2bbd..5ddf0df 100644 --- a/plugins/nf-kafka/src/test/nextflow/events/DslTest.groovy +++ b/plugins/nf-kafka/src/test/nextflow/events/DslTest.groovy @@ -146,8 +146,8 @@ class DslTest extends Dsl2Spec implements KafkaContainerTrait{ process listener{ input: val(msg) output: stdout - script: - "echo $msg" + script: + "echo ${msg[1]}" } chn = channel.watchTopic("test").until{ it[1]=='end' } workflow{ @@ -163,7 +163,7 @@ class DslTest extends Dsl2Spec implements KafkaContainerTrait{ def result = new MockScriptRunner(config).setScript(SCRIPT).execute() then: - [result.val[1],result.val[1]].sort() == ['echo Hola','echo Hi'].sort() + [result.val,result.val].sort() == ['echo Hola','echo Hi'].sort() } def 'cand write into and read from a topic' () {