diff --git a/.github/workflows/tests-rc.yaml b/.github/workflows/tests-rc.yaml new file mode 100644 index 00000000..83c8ddc2 --- /dev/null +++ b/.github/workflows/tests-rc.yaml @@ -0,0 +1,72 @@ +name: Tests (Bee RC) + +on: + push: + branches: + - 'master' + pull_request: + branches: + - '**' + +env: + BEE_API_URL: 'http://localhost:1633' + BEE_PEER_API_URL: 'http://localhost:11633' + +jobs: + tests-bee-rc: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - 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 @fairdatasociety/fdp-play @ethersphere/swarm-cli npxie + + - name: Clone fdp-play + run: git clone https://github.com/fairDataSociety/fdp-play + + - 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=ethersphere/bee.git + + - name: Clean up fdp-play + run: rm -rf fdp-play/test + + - name: Run bee-dev + run: bee-dev --port 16337 & + + - name: Run bee-dev with --no-swap + run: bee-dev --port 16338 --no-swap & + + - name: Start fdp-play environment + run: fdp-play start --detach --blockchain-image ethereum/client-go:release-1.13 --bee-version HEAD-commit + + - 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: Print swarm-cli status + continue-on-error: true + run: swarm-cli status + + - name: Tests + run: npm run test diff --git a/.github/workflows/ci.yaml b/.github/workflows/tests.yaml similarity index 63% rename from .github/workflows/ci.yaml rename to .github/workflows/tests.yaml index 6760bb1d..e752252a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/tests.yaml @@ -1,4 +1,4 @@ -name: Node.js tests +name: Tests (Bee stable) on: push: @@ -13,41 +13,32 @@ env: BEE_PEER_API_URL: 'http://localhost:11633' jobs: - node-tests: + tests-bee-stable: runs-on: ubuntu-latest - strategy: - matrix: - bee-version: ['d0aa8b9-commit'] - steps: - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 1 + uses: actions/checkout@v6 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 24.x - - name: Install dependencies + - name: Install local dependencies run: npm ci - - name: Install fdp-play - run: npm install --global @fairdatasociety/fdp-play - - - name: Install swarm-cli - run: npm install --global @ethersphere/swarm-cli + - name: Install global dependencies + run: npm install --global bee-dev @fairdatasociety/fdp-play @ethersphere/swarm-cli npxie - name: Run bee-dev - run: npx bee-dev --port 16337 & + run: bee-dev --port 16337 & - name: Run bee-dev with --no-swap - run: npx bee-dev --port 16338 --no-swap & + run: bee-dev --port 16338 --no-swap & - name: Start fdp-play environment - run: fdp-play start --detach --fresh --bee-version ${{ matrix.bee-version }} + run: fdp-play start --detach --fresh --bee-version d0aa8b9-commit - name: Deposit to chequebook run: | @@ -67,5 +58,5 @@ jobs: - name: Compare coverage if: github.ref != 'refs/heads/master' run: - npx npxie coverage-comparison "${{ github.repository }}" "master" "${{ github.head_ref }}" + npxie coverage-comparison "${{ github.repository }}" "master" "${{ github.head_ref }}" "test/coverage/coverage-summary.json" "${{ github.event.pull_request.number }}" "${{ secrets.GITHUB_TOKEN }}"