Skip to content

ci: test with bee-2.7.0 #2041

ci: test with bee-2.7.0

ci: test with bee-2.7.0 #2041

Workflow file for this run

name: Tests
on:
push:
branches:
- 'master'
pull_request:
branches:
- '**'
jobs:
nodejs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 20.x
- name: Install local dependencies
run: npm ci
- name: Install global dependencies
run: npm install --global bee-dev @fairdatasociety/fdp-play @ethersphere/swarm-cli npxie
- name: Run bee-dev
run: bee-dev --port 16337 &
- name: Install fdp-play dependencies
run: |
cd fdp-play && npm install
cd orchestrator && npm install
- name: Build fdp-play images
run: |
cd fdp-play/orchestrator
npm run build:env -- --build-base-bee --bee-repository=Cafe137/inbee4.git
- name: Clean up fdp-play
run: rm -rf fdp-play/test
- name: Start fdp-play environment
run: fdp-play start --detach --blockchain-image ethereum/client-go:release-1.13 --bee-version HEAD-commit
- name: Stake
if: false
run: swarm-cli stake deposit --bzz 10.1 --yes
- name: Deposit to chequebook
run: |
swarm-cli cheque deposit 100000000000000000
swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:11633
swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:21633
swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:31633
swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:41633
- 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: '566058308ad5fa3888173c741a1fb902c9f1f19559b11fc2738dfc53637ce4e9'
JEST_WITHDRAW_ADDRESS: '0x0000000000000000000000000000000000000000'
run: |
set +e
npm test
echo "exit_code=$?" >> $GITHUB_OUTPUT
set -e
- name: Compare coverage
if: github.ref != 'refs/heads/master'
run:
npxie@2.6.1-rc.5 coverage-comparison "${{ github.repository }}" "master" "${{ github.head_ref }}"
"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