You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/06/12 13:43:37 UTC

[camel] branch main updated: incrmental-build - skip mvnd install for tests

This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 0bbe7e7b898 incrmental-build - skip mvnd install for tests
0bbe7e7b898 is described below

commit 0bbe7e7b8987be95321de17015ecbd818d1f0222
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Mon Jun 12 15:07:57 2023 +0200

    incrmental-build - skip mvnd install for tests
---
 .github/actions/incremental-build/action.yaml | 5 +++++
 .github/actions/install-mvnd/action.yml       | 8 ++++++++
 .github/workflows/pr-build-main.yml           | 5 +++--
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/.github/actions/incremental-build/action.yaml b/.github/actions/incremental-build/action.yaml
index 48e4127cd3a..45782100360 100644
--- a/.github/actions/incremental-build/action.yaml
+++ b/.github/actions/incremental-build/action.yaml
@@ -27,6 +27,10 @@ inputs:
   github-token:
     description: 'The github token to access to the API'
     required: false
+  skip-mvnd-install:
+    description: 'Flag indicating whether the installation of mvnd should be skipped'
+    required: false
+    default: 'false'
 runs:
   using: "composite"
   steps:
@@ -35,6 +39,7 @@ runs:
       with:
         version: 1.0-m6
         distribution: m39-linux-amd64
+        dry-run: ${{ inputs.skip-mvnd-install }}
     - name: maven build
       shell: bash
       run: ${{ github.action_path }}/incremental-build.sh ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd ${{ inputs.mode }} ${{ inputs.pr-id }}
diff --git a/.github/actions/install-mvnd/action.yml b/.github/actions/install-mvnd/action.yml
index 3035c3c3f50..a18cfe0cd0f 100644
--- a/.github/actions/install-mvnd/action.yml
+++ b/.github/actions/install-mvnd/action.yml
@@ -26,6 +26,10 @@ inputs:
     description: 'The maven distribution to use'
     required: true
     default: 'linux-amd64'
+  dry-run:
+    description: 'Flag to enable to the dry-run mode'
+    required: true
+    default: 'false'
 outputs:
   mvnd-dir:
     description: "The directory where the command mvnd is located"
@@ -34,13 +38,17 @@ runs:
   using: "composite"
   steps:
     - run: curl -fsSL -o mvnd.zip https://archive.apache.org/dist/maven/mvnd/${{ inputs.version }}/maven-mvnd-${{ inputs.version }}-${{ inputs.distribution }}.zip
+      if: inputs.dry-run == 'false'
       shell: bash
     - run: curl -fsSL -o mvnd.zip.sha256 https://archive.apache.org/dist/maven/mvnd/${{ inputs.version }}/maven-mvnd-${{ inputs.version }}-${{ inputs.distribution }}.zip.sha256
+      if: inputs.dry-run == 'false'
       shell: bash
     - id: integrity-check
       run: echo "$(cat mvnd.zip.sha256) mvnd.zip" | sha256sum --check
+      if: inputs.dry-run == 'false'
       shell: bash
     - run: unzip mvnd.zip -d /tmp/
+      if: inputs.dry-run == 'false'
       shell: bash
     - id: mvnd-location
       run: echo "mvnd-dir=/tmp/maven-mvnd-${{ inputs.version }}-${{ inputs.distribution }}/bin" >> $GITHUB_OUTPUT
diff --git a/.github/workflows/pr-build-main.yml b/.github/workflows/pr-build-main.yml
index 4dc1b170247..f8dbf8d8802 100644
--- a/.github/workflows/pr-build-main.yml
+++ b/.github/workflows/pr-build-main.yml
@@ -141,15 +141,16 @@ jobs:
           distribution: 'temurin'
           java-version: ${{ matrix.java }}
           cache: 'maven'
-      - name: fast build
+      - name: mvn build
         uses: ./.github/actions/incremental-build
         with:
           mode: build
           pr-id: ${{ github.event.number }}
           github-token: ${{ secrets.GITHUB_TOKEN }}
-      - name: tests
+      - name: mvn test
         uses: ./.github/actions/incremental-build
         with:
           mode: test
           pr-id: ${{ github.event.number }}
           github-token: ${{ secrets.GITHUB_TOKEN }}
+          skip-mvnd-install: 'true'