Skip to content

Commit c41a006

Browse files
committed
fix: remove unused services and streamline CI workflow
1 parent 52ca2ae commit c41a006

File tree

1 file changed

+10
-90
lines changed

1 file changed

+10
-90
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,6 @@ concurrency:
1717
jobs:
1818
build-and-test:
1919
runs-on: ubuntu-latest
20-
21-
services:
22-
graphnode-postgres:
23-
image: postgres:16.8
24-
ports:
25-
- 5432:5432
26-
env:
27-
POSTGRES_USER: graphnode
28-
POSTGRES_PASSWORD: password
29-
POSTGRES_DB: graphnode-db
30-
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
31-
options: >-
32-
--health-cmd "pg_isready -U graphnode -d graphnode-db"
33-
--health-interval 10s
34-
--health-timeout 5s
35-
--health-retries 3
36-
-- postgres
37-
-cshared_preload_libraries=pg_stat_statements
38-
39-
ipfs:
40-
image: ipfs/kubo:v0.34.1
41-
ports:
42-
- 8080:8080
43-
- 5001:5001
4420

4521
steps:
4622
- name: Checkout
@@ -64,9 +40,9 @@ jobs:
6440
# - name: Run unit tests
6541
# run: npm run test:unit
6642

67-
- name: Prepare local stack env
68-
id: prepare
69-
run: npx tsx ./test-stack/prepare-test-env.ts
43+
# - name: Prepare local stack env
44+
# id: prepare
45+
# run: npx tsx ./test-stack/prepare-test-env.ts
7046

7147
# - name: Fetch genesis block number
7248
# id: fetch_block
@@ -76,70 +52,14 @@ jobs:
7652
# echo "BLOCK=$BLOCK_NUMBER" >> $GITHUB_OUTPUT
7753
# echo "URL=$FORK_URL" >> $GITHUB_OUTPUT
7854

79-
- name: Fetch genesis block number
80-
id: fetch_block
81-
run: |
82-
BLOCK_NUMBER=33335100
83-
FORK_URL="http://localhost:8545"
84-
echo "BLOCK=$BLOCK_NUMBER" >> $GITHUB_OUTPUT
85-
echo "URL=$FORK_URL" >> $GITHUB_OUTPUT
86-
87-
- name: Start Anvil
88-
uses: iExecBlockchainComputing/anvil-github-action@main
55+
- name: Docker Compose Action
56+
uses: hoverkraft-tech/[email protected]
8957
with:
90-
fork-url: ${{ steps.fetch_block.outputs.URL }}
91-
fork-block-number: ${{ steps.fetch_block.outputs.BLOCK }}
92-
93-
- name: Wait for IPFS
94-
run: |
95-
# Wait for IPFS to be ready
96-
echo "Waiting for IPFS to be ready..."
97-
timeout 60 bash -c 'until curl -s http://localhost:5001 > /dev/null; do sleep 2; done'
98-
99-
- name: Start Graph Node
100-
run: |
101-
docker run -d \
102-
--name graphnode \
103-
-p 8000:8000 \
104-
-p 8020:8020 \
105-
-e POSTGRES_HOST=graphnode-postgres \
106-
-e POSTGRES_PORT=5432 \
107-
-e POSTGRES_USER=graphnode \
108-
-e POSTGRES_PASSWORD=password \
109-
-e POSTGRES_DB=graphnode-db \
110-
-e IPFS=http://localhost:5001 \
111-
-e ETHEREUM=bellecour:"${{ steps.fetch_block.outputs.URL }}" \
112-
-e GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER="${{ steps.fetch_block.outputs.BLOCK }}" \
113-
--health-cmd "nc -w 1 localhost 8020" \
114-
--health-interval 10s \
115-
--health-timeout 5s \
116-
--health-retries 5 \
117-
--health-start-period 30s \
118-
graphprotocol/graph-node:v0.37.0
119-
120-
- name: Wait for services
121-
run: |
122-
# Wait for blockchain-fork to be ready
123-
echo "Waiting for blockchain-fork to be ready..."
124-
timeout 60 bash -c 'until (echo >/dev/tcp/localhost/8545) &>/dev/null; do sleep 2; done'
125-
126-
# Wait for graph-node to be ready
127-
echo "Waiting for graph-node to be ready..."
128-
timeout 60 bash -c 'until curl -s http://localhost:8020/graphql > /dev/null; do sleep 2; done'
129-
130-
- name: Build and run subgraph deployer
131-
run: |
132-
cd test-stack
133-
134-
# Build the deployer image
135-
docker build -t poco-subgraph-deployer -f ./Dockerfile ..
136-
137-
# Run the deployer container
138-
docker run --network host \
139-
-e GRAPHNODE_URL=http://localhost:8020 \
140-
-e IPFS_URL=http://localhost:5001 \
141-
-e NETWORK_NAME=bellecour \
142-
poco-subgraph-deployer
58+
compose-file: "./test-stack/docker-compose.yml"
59+
env:
60+
FORK_URL: "http://loclalhost:8545"
61+
FORK_BLOCK: 33336357
62+
NETWORK_NAME: "bellecour"
14363

14464
- name: Run integration tests
14565
run: npm run test:e2e

0 commit comments

Comments
 (0)