You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2022/02/02 13:55:49 UTC

[camel-quarkus-examples] 02/06: Use yq installed on the GitHub actions VM instead of downloading and installing it

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

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git

commit 09ef693f255a1fb12f4110cc795cfadbc554c6a6
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Jan 14 14:54:31 2022 +0000

    Use yq installed on the GitHub actions VM instead of downloading and installing it
---
 .github/workflows/ci-build.yaml | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml
index 6fbb4f9..cb73f1f 100644
--- a/.github/workflows/ci-build.yaml
+++ b/.github/workflows/ci-build.yaml
@@ -111,10 +111,8 @@ jobs:
       - name: Setup Integration Test Matrix
         id: set-itest-matrix
         run: |
-          sudo wget -O /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/3.2.1/yq_linux_amd64"
-          sudo chmod +x /usr/local/bin/yq
-          CATEGORIES=$(cat .github/test-categories.yaml | yq r - --printMode p "*." | sed "s/\(.*\)/'\1'/" | sed ':a;N;$!ba;s/\n/,/g')
-          echo "::set-output name=matrix::{'category': [${CATEGORIES}]}"
+          CATEGORIES=$(yq -M -N -I 0 -o=json e 'keys' .github/test-categories.yaml | tr '"' "'")
+          echo "::set-output name=matrix::{'category': ${CATEGORIES}}"
 
   integration-tests:
     name: Integration Tests - ${{matrix.category}}
@@ -140,15 +138,11 @@ jobs:
         shell: bash
         run: |
           tar -xzf ../maven-repo.tgz -C ~
-      - name: Install yq
-        run: |
-          sudo wget -O /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/3.2.1/yq_linux_amd64"
-          sudo chmod +x /usr/local/bin/yq
       - name: Integration Tests
         run: |
           EXAMPLE_PROJECTS=""
-          for EXAMPLE in $(cat .github/test-categories.yaml | yq r - "${{ matrix.category }}.*"); do
-            if [ "${EXAMPLE}" == "-" ]; then
+          for EXAMPLE in $(yq -M -N e ".${{ matrix.category }}" .github/test-categories.yaml | cut -f2 -d' '); do
+            if [ "${EXAMPLE}" == "null" ]; then
               continue
             fi