-
Notifications
You must be signed in to change notification settings - Fork 25
81 lines (65 loc) · 2.29 KB
/
tests.yaml
File metadata and controls
81 lines (65 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Tests (Bee stable)
on:
push:
branches:
- 'master'
pull_request:
branches:
- '**'
env:
BEE_API_URL: 'http://localhost:1633'
BEE_PEER_API_URL: 'http://localhost:11633'
jobs:
tests-bee-stable:
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 @ethersphere/bee-factory @ethersphere/swarm-cli npxie
- 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 bee-factory
run: bee-factory start --tag v2.8.0
- name: Print swarm-cli status
continue-on-error: true
run: swarm-cli status
- name: Tests
run: npm run test:coverage
- name: Upload coverage
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
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 --limit 1 --json databaseId --jq '.[0].databaseId')
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@v4
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 }}"