Skip to content

refactor!: split methods to separated namespaces #2476

refactor!: split methods to separated namespaces

refactor!: split methods to separated namespaces #2476

Workflow file for this run

name: Tests (Bee stable)
on:
push:
branches:
- 'master'
pull_request:
branches:
- '**'
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: echo "JEST_MANAGED_BATCH_ID=$(swarm-cli stamp buy --depth 20 --amount 1b --quiet)" >> $GITHUB_ENV
- name: Create external postage batch
run: echo "JEST_EXTERNAL_BATCH_ID=$(swarm-cli stamp buy --depth 20 --amount 1b --quiet)" >> $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
- name: Upload coverage
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v7
with:
name: coverage-master
path: test/coverage/coverage-summary.json
- name: Get master run ID
if: github.ref != 'refs/heads/master'
id: get-run-id
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
run: |
RUN_ID=$(gh run list --branch master --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 master coverage
if: github.ref != 'refs/heads/master'
id: download-coverage
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: coverage-master
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ steps.get-run-id.outputs.run-id }}
path: coverage-master
- name: Compare coverage
if: github.ref != 'refs/heads/master' && steps.download-coverage.outcome == 'success'
run: |
npxie coverage-comparison "${{ github.repository }}" "./coverage-master/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