Fix executeConcurrent successCount when stopping on error (#18) #24
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: E2E Tests (1C3D) | |
| on: | |
| push: | |
| branches: [ develop, dev/* ] | |
| pull_request: | |
| branches: [ develop ] | |
| jobs: | |
| e2e-1c3d: | |
| name: E2E 1C3D (iotdb ${{ matrix.iotdb-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| iotdb-version: ["2.0.6", "2.0.10"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Create test results directory | |
| run: mkdir -p test-results | |
| - name: Start IoTDB Cluster with Docker Compose | |
| env: | |
| IOTDB_VERSION: ${{ matrix.iotdb-version }} | |
| run: | | |
| docker compose -f docker-compose-1c3d.yml up -d | |
| echo "Waiting for IoTDB cluster to be ready..." | |
| sleep 5 | |
| - name: Verify IoTDB ports are listening | |
| run: | | |
| echo "Checking IoTDB DataNode ports 6667, 6668, 6669..." | |
| ss -tuln | grep 6667 || (echo "ERROR: Port 6667 is not listening!" && exit 1) | |
| ss -tuln | grep 6668 || (echo "ERROR: Port 6668 is not listening!" && exit 1) | |
| ss -tuln | grep 6669 || (echo "ERROR: Port 6669 is not listening!" && exit 1) | |
| echo "All three DataNode ports (6667, 6668, 6669) are listening ✓" | |
| - name: Show Docker container status | |
| continue-on-error: true | |
| run: | | |
| echo "=== Docker containers status ===" | |
| docker compose -f docker-compose-1c3d.yml ps | |
| echo "" | |
| echo "=== Recent logs from iotdb-datanode-1 ===" | |
| docker compose -f docker-compose-1c3d.yml logs --tail=30 iotdb-datanode-1 | |
| echo "" | |
| echo "=== Recent logs from iotdb-datanode-2 ===" | |
| docker compose -f docker-compose-1c3d.yml logs --tail=30 iotdb-datanode-2 | |
| echo "" | |
| echo "=== Recent logs from iotdb-datanode-3 ===" | |
| docker compose -f docker-compose-1c3d.yml logs --tail=30 iotdb-datanode-3 | |
| - name: Run E2E Tests | |
| env: | |
| IOTDB_HOST: localhost | |
| IOTDB_PORT: 6667 | |
| IOTDB_PORT_2: 6668 | |
| IOTDB_PORT_3: 6669 | |
| IOTDB_USER: root | |
| IOTDB_PASSWORD: root | |
| MULTI_NODE: 'true' | |
| run: | | |
| set -o pipefail | |
| npm run test:e2e 2>&1 | tee test-results/test-output.log | |
| - name: Collect Docker logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Collecting Docker logs ===" | |
| mkdir -p test-results/docker-logs | |
| docker compose -f docker-compose-1c3d.yml logs > test-results/docker-logs/all-containers.log | |
| docker compose -f docker-compose-1c3d.yml logs iotdb-confignode > test-results/docker-logs/confignode.log | |
| docker compose -f docker-compose-1c3d.yml logs iotdb-datanode-1 > test-results/docker-logs/datanode-1.log | |
| docker compose -f docker-compose-1c3d.yml logs iotdb-datanode-2 > test-results/docker-logs/datanode-2.log | |
| docker compose -f docker-compose-1c3d.yml logs iotdb-datanode-3 > test-results/docker-logs/datanode-3.log | |
| echo "Docker logs saved to test-results/docker-logs/" | |
| - name: Stop and clean up Docker Compose | |
| if: always() | |
| run: | | |
| docker compose -f docker-compose-1c3d.yml down -v | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-test-results-1c3d-iotdb-${{ matrix.iotdb-version }} | |
| path: test-results/ |