Merge pull request #202 from aojea/substrate #318
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2026 Google LLC | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: kind-mesh-e2e | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| GO_VERSION: "1.26" | |
| jobs: | |
| kind_mesh_e2e: | |
| runs-on: ubuntu-22.04 | |
| name: Kind mesh e2e | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Install kind and kubectl | |
| run: | | |
| go install sigs.k8s.io/kind@latest | |
| echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" | |
| curl -sSLo /tmp/kubectl "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
| sudo install -m 0755 /tmp/kubectl /usr/local/bin/kubectl | |
| kind version | |
| kubectl version --client | |
| - name: Build binaries | |
| run: make build | |
| - name: Bring up the kind mesh | |
| run: make kind-up ARGS="-s" | |
| - name: Run e2e mesh tests | |
| run: make kind-e2e-mesh | |
| - name: Collect logs on failure | |
| if: failure() | |
| run: | | |
| mkdir -p _artifacts | |
| kubectl --context kind-sam-kind -n sam-kind get pods -o wide > _artifacts/pods.txt 2>&1 || true | |
| kubectl --context kind-sam-kind -n sam-kind logs deploy/sam-control-plane --all-containers --tail=-1 > _artifacts/sam-control-plane.log 2>&1 || true | |
| kubectl --context kind-sam-kind -n sam-kind logs statefulset/sam-router --all-containers --tail=-1 > _artifacts/sam-router.log 2>&1 || true | |
| for d in node-a node-b node-c; do | |
| kubectl --context kind-sam-kind -n sam-kind logs "deploy/$d" --all-containers --tail=-1 > "_artifacts/$d.log" 2>&1 || true | |
| done | |
| cp "$RUNNER_TEMP/local-node.log" _artifacts/ 2>/dev/null || true | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: kind-mesh-e2e-logs-${{ github.run_id }} | |
| path: ./_artifacts | |
| - name: Tear down the cluster | |
| if: always() | |
| run: make kind-down |