fix: change work_item_batch_size type from usize to u64 (#2379) #85
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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - "*" | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| name: js-token-interface-v2 | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| token-interface-js-v2: | |
| name: token-interface-js-v2 | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis:8.0.1 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| LIGHT_PROTOCOL_VERSION: V2 | |
| REDIS_URL: redis://localhost:6379 | |
| CI: true | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Setup and build | |
| uses: ./.github/actions/setup-and-build | |
| with: | |
| skip-components: "redis,disk-cleanup,go" | |
| cache-key: "js" | |
| - name: Build token-interface with V2 | |
| run: | | |
| cd js/token-interface | |
| pnpm build:v2 | |
| - name: Build CLI | |
| run: | | |
| just cli build | |
| - name: Run token-interface unit tests with V2 | |
| run: | | |
| echo "Running token-interface unit tests with retry logic (max 2 attempts)..." | |
| attempt=1 | |
| max_attempts=2 | |
| until just js test-token-interface-unit-v2; do | |
| attempt=$((attempt + 1)) | |
| if [ $attempt -gt $max_attempts ]; then | |
| echo "Tests failed after $max_attempts attempts" | |
| exit 1 | |
| fi | |
| echo "Attempt $attempt/$max_attempts failed, retrying..." | |
| sleep 5 | |
| done | |
| echo "Tests passed on attempt $attempt" | |
| - name: Run token-interface e2e tests with V2 | |
| run: | | |
| echo "Running token-interface e2e tests with retry logic (max 2 attempts)..." | |
| attempt=1 | |
| max_attempts=2 | |
| until just js test-token-interface-e2e-v2; do | |
| attempt=$((attempt + 1)) | |
| if [ $attempt -gt $max_attempts ]; then | |
| echo "Tests failed after $max_attempts attempts" | |
| exit 1 | |
| fi | |
| echo "Attempt $attempt/$max_attempts failed, retrying..." | |
| sleep 5 | |
| done | |
| echo "Tests passed on attempt $attempt" | |
| - name: Display prover logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Displaying prover logs ===" | |
| find . -path "*/test-ledger/*prover*.log" -type f -exec echo "=== Contents of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \; || echo "No prover logs found" |