integrate-cluster-scale #5041
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
| --- | |
| name: integrate-cluster-scale | |
| on: | |
| schedule: | |
| # times are in UTC | |
| - cron: '19 21 * * *' | |
| pull_request: | |
| branches: | |
| - master | |
| - release-* | |
| paths-ignore: | |
| - '**.html' | |
| - '**.md' | |
| - 'CNAME' | |
| - 'LICENSE' | |
| - 'doc/**' | |
| - 'embed/templates/examples/**' | |
| - 'components/client/**' | |
| - 'components/ctl/**' | |
| - 'components/dm/**' | |
| - 'components/doc/**' | |
| - 'components/errdoc/**' | |
| - 'components/playground/**' | |
| - 'server/**' | |
| - 'pkg/version/version.go' | |
| - '.github/workflows/integrate-tiup**' | |
| - '.github/workflows/integrate-dm**' | |
| - '.github/workflows/integrate-playground**' | |
| jobs: | |
| cluster: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| cases: | |
| - 'test_scale_core' | |
| - 'test_scale_tools' | |
| - 'test_scale_core_tls' | |
| - 'test_scale_tools_tls' | |
| - 'test_scale_tiproxy' | |
| steps: | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Set up Go 1.24 | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.24.x | |
| id: go | |
| - name: Build build_integration_test | |
| run: | | |
| export PATH=$PATH:$GOPATH/bin | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential python-is-python3 python3-pip ca-certificates curl | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | |
| sudo chmod a+r /etc/apt/keyrings/docker.asc | |
| echo \ | |
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ | |
| $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \ | |
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt-get update | |
| sudo apt-get install -y docker-compose-plugin | |
| make build_integration_test | |
| - name: Build the docker-compose stack | |
| # with --dev the first run will fail for unknow reason, just retry it and will success now.. | |
| run: TIUP_CLUSTER_ROOT=$(pwd) ./docker/up.sh --daemon | |
| - name: Check running containers | |
| run: | | |
| docker ps | |
| df -h | |
| free -h | |
| - name: Run test suite | |
| id: test | |
| run: | | |
| # ensuere docker ssh is ready | |
| sleep 5 | |
| # should not use -it | |
| # ref: https://stackoverflow.com/questions/43099116/error-the-input-device-is-not-a-tty | |
| docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/run.sh ${{ matrix.cases }} | |
| - name: Collect component log | |
| if: ${{ failure() }} | |
| # if: always() | |
| run: | | |
| docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/script/pull_log.sh /tiup-cluster/logs | |
| - name: Detect error log | |
| if: ${{ failure() }} | |
| run: | | |
| bash ./tests/tiup-cluster/script/detect_error.sh ./logs/ | |
| - name: Upload component log | |
| if: ${{ failure() }} | |
| # if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| overwrite: true | |
| name: cluster_logs | |
| path: ./logs | |
| - name: Output cluster debug log | |
| if: ${{ failure() }} | |
| # if: always() | |
| run: | | |
| pwd | |
| docker ps | |
| df -h | |
| free -h | |
| find ./logs -type f -exec sh -c 'echo "{}" && cat {} && echo "\n"' \; || true | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./tests/tiup-cluster/cover/*.out | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |