chore(upcoming): release 13.0.1 #2595
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: Tests (Bee stable) | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| - 'upcoming' | |
| pull_request: | |
| branches: | |
| - '**' | |
| # Called by the "Publish upcoming snapshot to npm" orchestrator on push to `upcoming`. | |
| workflow_call: | |
| jobs: | |
| tests-bee-stable: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.x | |
| - name: Install local dependencies | |
| run: npm ci | |
| - name: Install global dependencies | |
| run: npm install --global bee-dev @ethersphere/bee-factory @ethersphere/swarm-cli npxie | |
| - name: Run bee-dev | |
| run: bee-dev --port 16337 & | |
| - name: Start bee-factory | |
| run: bee-factory start --tag v2.8.1 | |
| - name: Create managed postage batch | |
| run: | | |
| for i in 1 2 3; do | |
| BATCH_ID=$(swarm-cli stamp buy --depth 20 --amount 1b --quiet) && break | |
| echo "Postage stamp purchase timed out, retrying ($i/3)..." | |
| done | |
| echo "JEST_MANAGED_BATCH_ID=$BATCH_ID" >> $GITHUB_ENV | |
| - name: Create external postage batch | |
| run: | | |
| for i in 1 2 3; do | |
| BATCH_ID=$(swarm-cli stamp buy --depth 20 --amount 1b --quiet) && break | |
| echo "Postage stamp purchase timed out, retrying ($i/3)..." | |
| done | |
| echo "JEST_EXTERNAL_BATCH_ID=$BATCH_ID" >> $GITHUB_ENV | |
| - name: Tests | |
| id: tests | |
| env: | |
| JEST_BEE_URL: http://localhost:1633 | |
| JEST_BEE_SIGNER: '8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba' | |
| JEST_WITHDRAW_ADDRESS: '0xd238ff944bacb478cbed5efcae784d7bf4f2ff80' | |
| run: | | |
| set +e | |
| npm test | |
| echo "exit_code=$?" >> $GITHUB_OUTPUT | |
| set -e | |
| # Baseline coverage comes from `upcoming` (the integration trunk that PRs merge into). | |
| - name: Upload coverage baseline | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/upcoming' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-upcoming | |
| path: test/coverage/coverage-summary.json | |
| - name: Get upcoming run ID | |
| if: github.event_name == 'pull_request' | |
| id: get-run-id | |
| continue-on-error: true | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| RUN_ID=$(gh run list --branch upcoming --workflow tests.yaml --status success --limit 1 --json databaseId --jq '.[0].databaseId') | |
| if [ -z "$RUN_ID" ]; then exit 0; fi | |
| echo "run-id=$RUN_ID" >> $GITHUB_OUTPUT | |
| - name: Download upcoming coverage | |
| if: github.event_name == 'pull_request' | |
| id: download-coverage | |
| continue-on-error: true | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: coverage-upcoming | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| run-id: ${{ steps.get-run-id.outputs.run-id }} | |
| path: coverage-upcoming | |
| - name: Compare coverage | |
| if: github.event_name == 'pull_request' && steps.download-coverage.outcome == 'success' | |
| run: | | |
| npxie coverage-comparison "${{ github.repository }}" "./coverage-upcoming/coverage-summary.json" "test/coverage/coverage-summary.json" "${{ github.event.pull_request.number }}" "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Fail if tests failed | |
| if: steps.tests.outputs.exit_code != '0' | |
| run: exit 1 |