Skip to content

Commit e4a0c39

Browse files
committed
separate docker local test and it test
1 parent 86f747d commit e4a0c39

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

docker/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
FROM node:22-alpine
2-
RUN apk --no-cache add jq bash
1+
FROM node:22
32
WORKDIR /iexec-poco-subgraph
43
COPY package*.json .
54
RUN npm ci
65
COPY schema.graphql .
76
COPY subgraph.template.yaml .
87
COPY networks.json .
9-
COPY config.json .
10-
COPY generate_subgraph_file.sh .
118
COPY src src
12-
ENTRYPOINT [ "npm", "run", "deploy:all" ]
9+
ENTRYPOINT [ "npm", "run", "deploy:all" ]

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
"codegen": "graph codegen subgraph.template.yaml",
99
"test": "npm run codegen && graph test",
1010
"test-docker": "npm run codegen && docker run -it --rm -v $(pwd):/matchstick/subgraph rainprotocol/matchstick:main",
11-
"build": "npm run codegen && cp subgraph.template.yaml subgraph.yaml && graph build --network ${NETWORK_NAME:-bellecour} && ./generate_subgraph_file.sh ${NETWORK_NAME:-bellecour}",
11+
"build": "npm run codegen && cp subgraph.template.yaml subgraph.yaml && graph build --network ${NETWORK_NAME:-bellecour}",
12+
"build:local-test": "npm run codegen && cp subgraph.template.yaml subgraph.yaml && graph build --network ${NETWORK_NAME:-bellecour} && ./generate_subgraph_file.sh ${NETWORK_NAME:-bellecour}",
1213
"create": "graph create ${NETWORK_NAME:-bellecour}/poco --node ${GRAPHNODE_URL:-http://localhost:8020}",
1314
"deploy": "graph deploy ${NETWORK_NAME:-bellecour}/poco --node ${GRAPHNODE_URL:-http://localhost:8020} --ipfs ${IPFS_URL:-http://localhost:5001} --version-label ${VERSION_LABEL:-bellecour/poco-v5}",
1415
"deploy:all": "npm run build && npm run create && npm run deploy",
16+
"all-local-test": "npm run build:local-test && npm run create && npm run deploy",
1517
"itest": "DEBUG=testcontainers:* mocha",
1618
"stop-test-stack": "cd test-stack && docker compose down --remove-orphans --volumes",
1719
"start-test-stack": "npm run stop-test-stack && cd test-stack && docker compose build && docker compose up -d"

test-stack/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:22-alpine
2+
RUN apk --no-cache add jq bash
3+
WORKDIR /iexec-poco-subgraph
4+
COPY package*.json .
5+
RUN npm ci
6+
COPY schema.graphql .
7+
COPY subgraph.template.yaml .
8+
COPY networks.json .
9+
COPY config.json .
10+
COPY generate_subgraph_file.sh .
11+
COPY src src
12+
ENTRYPOINT [ "npm", "run", "deploy:all-local-test" ]

0 commit comments

Comments
 (0)