You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2022/10/31 09:01:48 UTC

[skywalking-infra-e2e] branch main updated: Improve GitHub Actions usability and speed by using composite actions' new feature (#90)

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

kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git


The following commit(s) were added to refs/heads/main by this push:
     new 756c27d  Improve GitHub Actions usability and speed by using composite actions' new feature (#90)
756c27d is described below

commit 756c27dd90773cb2e0747ab782a53047672e97af
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Mon Oct 31 17:01:43 2022 +0800

    Improve GitHub Actions usability and speed by using composite actions' new feature (#90)
---
 action.yaml | 41 +++++++++++++++++++++++++++++++++--------
 1 file changed, 33 insertions(+), 8 deletions(-)

diff --git a/action.yaml b/action.yaml
index 37dbc01..a22b0f3 100644
--- a/action.yaml
+++ b/action.yaml
@@ -24,21 +24,46 @@ inputs:
   log-dir:
     description: The container logs directory
     required: false
-
 runs:
   using: "composite"
   steps:
+    - name: Set up Go 1.18
+      uses: actions/setup-go@v2
+      with:
+        go-version: 1.18
+    - if: runner.os == 'Linux'
+      uses: actions/cache@v3
+      working-directory: ${{ github.action_path}}
+      with:
+        path: |
+          ~/.cache/go-build
+          ~/go/pkg/mod
+        key: skywalking-infra-e2e-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
+        restore-keys: skywalking-infra-e2e-${{ runner.os }}-go-
+    - if: runner.os == 'macOS'
+      uses: actions/cache@v3
+      with:
+        path: |
+          ~/Library/Caches/go-build
+          ~/go/pkg/mod
+        key: skywalking-infra-e2e-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
+        restore-keys: skywalking-infra-e2e-${{ runner.os }}-go-
+    - if: runner.os == 'Windows'
+      uses: actions/cache@v3
+      with:
+        path: |
+          ~\AppData\Local\go-build
+          ~\go\pkg\mod
+        key: skywalking-infra-e2e-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
+        restore-keys: skywalking-infra-e2e-${{ runner.os }}-go-
     - shell: bash
-      run: |
-        make -C $GITHUB_ACTION_PATH docker
-        docker run -v $(pwd):/tmp -w /tmp --entrypoint=sh docker.io/apache/e2e:latest -c "cp /usr/local/bin/e2e /tmp/e2e"
-        install ./e2e /usr/local/bin
+      run: make -C $GITHUB_ACTION_PATH install DESTDIR=/usr/local/bin
     - name: E2E Dir Generator
       id: 'e2e-dir-generator'
       shell: bash
       run: |
         WORK_DIR="${{ runner.temp }}/skywalking-infra-e2e"
-        echo "name=work::$WORK_DIR" >> $GITHUB_OUTPUT
+        echo "work=$WORK_DIR" >> $GITHUB_OUTPUT
 
         LOG_DIR=""
         LOG_JOB_DIR=""
@@ -67,8 +92,8 @@ runs:
           LOG_DIR="$WORK_DIR/${{ inputs.log-dir }}"
           LOG_JOB_DIR="$WORK_DIR/${{ inputs.log-dir }}"
         fi
-        echo "name=log::$LOG_DIR" >> $GITHUB_OUTPUT
-        echo "name=log-case::$LOG_JOB_DIR" >> $GITHUB_OUTPUT
+        echo "log=$LOG_DIR" >> $GITHUB_OUTPUT
+        echo "log-case=$LOG_JOB_DIR" >> $GITHUB_OUTPUT
         echo "SW_INFRA_E2E_LOG_DIR=$LOG_DIR" >> $GITHUB_ENV
     - shell: bash
       run: |