diff --git a/.github/workflows/build-and-test-plugin.yaml b/.github/workflows/build-and-test-plugin.yaml index 53a0ddcb0..f33444ccd 100644 --- a/.github/workflows/build-and-test-plugin.yaml +++ b/.github/workflows/build-and-test-plugin.yaml @@ -7,7 +7,7 @@ on: - 'plugins/**' - 'test/**' pull_request: - branches: ["*"] + branches: [ "*" ] paths: - 'plugins/**' - 'test/**' @@ -16,10 +16,10 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 1.19 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.19 # There are too many lint errors in current code bases # uncomment when we decide what lint should be addressed or ignored. # - run: make lint @@ -31,38 +31,43 @@ jobs: # TODO(Xunzhuo): Enable C WASM Filters in CI wasmPluginType: [ GO ] steps: - - uses: actions/checkout@v3 - - - name: "Setup Go" - uses: actions/setup-go@v3 - with: - go-version: 1.19 + - uses: actions/checkout@v3 - - name: Setup Golang Caches - uses: actions/cache@v3 - with: - path: |- - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ github.run_id }} - restore-keys: | - ${{ runner.os }}-go - - - name: Setup Submodule Caches - uses: actions/cache@v3 - with: - path: |- + - name: "Setup Go" + uses: actions/setup-go@v3 + with: + go-version: 1.19 + + - name: Setup Golang Caches + uses: actions/cache@v3 + with: + path: |- + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-go + + - name: Setup Submodule Caches + uses: actions/cache@v3 + with: + path: |- .git/modules - key: ${{ runner.os }}-submodules-cache-${{ github.run_id }} - restore-keys: ${{ runner.os }}-submodules-cache - - - run: git stash # restore patch + key: ${{ runner.os }}-submodules-cache-${{ github.run_id }} + restore-keys: ${{ runner.os }}-submodules-cache - - name: "Run Ingress WasmPlugins Tests" - run: GOPROXY="https://proxy.golang.org,direct" PLUGIN_TYPE=${{ matrix.wasmPluginType }} make higress-wasmplugin-test + - run: git stash # restore patch + + - name: "Run Ingress WasmPlugins Tests" + uses: nick-fields/retry@v3 + with: + timeout_minutes: 25 + max_attempts: 3 + retry_on: error + command: GOPROXY="https://proxy.golang.org,direct" PLUGIN_TYPE=${{ matrix.wasmPluginType }} make higress-wasmplugin-test publish: runs-on: ubuntu-latest - needs: [higress-wasmplugin-test] + needs: [ higress-wasmplugin-test ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3