Add sam-cop tool #651
Workflow file for this run
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: | |
| permissions: | |
| contents: read | |
| env: | |
| GO_VERSION: "1.26" | |
| jobs: | |
| kind_mesh_e2e: | |
| runs-on: ubuntu-22.04 | |
| name: Kind mesh e2e | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: false | |
| - name: Install kind and kubectl | |
| run: | | |
| sudo sysctl fs.inotify.max_user_watches=524288 || true | |
| sudo sysctl fs.inotify.max_user_instances=512 || true | |
| 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: MESH_CONFIG=development/kind/mesh-config.e2e.yaml 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 | |
| kind export logs --name sam-kind ./_artifacts/logs | |
| 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 |