Skip to content

Commit 261f3ec

Browse files
committed
fix running image from workflow
1 parent 5ae795b commit 261f3ec

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/coverage.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414

15-
services:
16-
tfchain:
17-
image: ghcr.io/threefoldtech/tfchain:2.8.1
18-
options: --dev --rpc-cors all --rpc-external --rpc-methods=safe
19-
ports:
20-
- 9944:9944
21-
2215
steps:
2316
- name: Set up Repository
2417
uses: actions/checkout@v2
@@ -41,6 +34,17 @@ jobs:
4134
- name: Install dependencies
4235
run: melos bootstrap
4336

37+
- name: Start TFChain Docker Container
38+
run: |
39+
sudo docker run --network host ghcr.io/threefoldtech/tfchain:2.8.1 --dev --rpc-cors all --rpc-external --rpc-methods=safe
40+
41+
- name: Wait for TFChain to be ready
42+
run: |
43+
while ! nc -z localhost 9944; do
44+
echo "Waiting for TFChain to be ready..."
45+
sleep 5
46+
done
47+
4448
- name: Run unit tests and generate coverage
4549
env:
4650
URL: ${{ secrets.URL }}
@@ -64,3 +68,6 @@ jobs:
6468
with:
6569
token: ${{ secrets.CODECOV_TOKEN }}
6670
files: coverage/filtered.lcov.info
71+
72+
- name: Stop and remove TFChain Docker Container
73+
run: sudo docker stop tfchain && sudo docker rm tfchain

0 commit comments

Comments
 (0)