Skip to content

Commit eb7355b

Browse files
authored
chore: Prepare release (#56)
1 parent a59e6fe commit eb7355b

File tree

5 files changed

+81
-46
lines changed

5 files changed

+81
-46
lines changed

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,13 @@
66
"endOfLine": "auto",
77
"plugins": [
88
"prettier-plugin-organize-imports"
9+
],
10+
"overrides": [
11+
{
12+
"files": ["**/*.json", "**/*.yml"],
13+
"options": {
14+
"tabWidth": 2
15+
}
16+
}
917
]
1018
}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{".":"2.0.0"}
1+
{ ".": "1.1.0" }

README.md

Lines changed: 64 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
# iExec PoCo v5 - subgraph
1+
# iExec PoCo Subgraph
22

3-
A subgraph to explore the PoCo smarcontracts
3+
A subgraph to index the PoCo Smart Contracts.
44

5-
[CHANGELOG](./CHANGELOG.md)
65

7-
# Setup coverage⁠
6+
## Local development
87

9-
> In order for Matchstick to check which handlers are being run, those handlers need to be exported from the test file.
10-
11-
Check how to export handlers with [Matchstick - Test Coverage documentation](https://thegraph.com/docs/en/subgraphs/developing/creating/unit-testing-framework/#test-coverage).
12-
13-
> [!NOTE]
14-
> Since Matchstick code coverage is in very early stages, Matchstick cannot check for branch coverage, but rely on the assertion that a given handler has been called.
15-
16-
## local dev
17-
18-
run local services:
8+
Run local services:
199

2010
- blockchain with iExec PoCo deployed
2111
- graph node (with ipfs + DB)
@@ -24,49 +14,91 @@ run local services:
2414
docker-compose -f docker/test/docker-compose.yml up -d
2515
```
2616

27-
install project deps
17+
Install project dependencies
2818

2919
```sh
3020
npm ci
3121
```
3222

33-
build the project and generate the necessary files:
23+
Build the project and generate the necessary files:
3424

3525
```sh
3626
npm run build
3727
```
3828

39-
deploy the subgraph on local node
29+
Deploy the subgraph on local node
4030

4131
```sh
4232
npm run start-test-stack
4333
```
4434

45-
run integration tests
35+
Run integration tests
4636

4737
```sh
4838
npm run itest
4939
```
5040

51-
test/poco subgraph graphql API enpoints:
52-
41+
The subgraph `test/poco` graphql API is accessible at:
5342
- queries: <http://127.0.0.1:8000/subgraphs/name/test/poco>
5443

55-
---
5644

57-
Here's the revised "Generating Subgraph and Jenkins Configuration Files" section for your README:
45+
### Coverage setup
46+
47+
> In order for Matchstick to check which handlers are being run, those handlers need to be exported from the test file.
48+
49+
Check how to export handlers with [Matchstick - Test Coverage documentation](https://thegraph.com/docs/en/subgraphs/developing/creating/unit-testing-framework/#test-coverage).
50+
51+
> [!NOTE]
52+
> Since Matchstick code coverage is in very early stages, Matchstick cannot check for branch coverage, but rely on the assertion that a given handler has been called.
53+
54+
## Deployment Options
55+
56+
### Thegraph network
57+
58+
#### CI/CD deployment (recommended)
59+
60+
The recommended approach to deploy the subgraph on The Graph network is to use
61+
the dedicated Github Actions workflow:
62+
63+
1. Set up the Github environment for the target network (e.g. `arbitrum`) with
64+
the required environnment variables and secrets:
65+
- `vars.SUBGRAPH_SLUG`
66+
- `secrets.SUBGRAPH_DEPLOY_KEY`
67+
- `vars.SUBGRAPH_NETWORK_NAME`
68+
- `VERSION_LABEL` is a workfow input
69+
70+
2. Trigger the deployment Action on Github and specify the `version_label` input.
71+
72+
#### Manual deployment
5873

59-
## Docker subgraph deployer
74+
To deploy this subgraph on Thegraph network manually:
6075

61-
docker image for deploying the subgraph
76+
1. Set up environment variables in `.env` file:
6277

63-
### Build Image
78+
```bash
79+
SUBGRAPH_SLUG=<subgraph-slug>
80+
SUBGRAPH_DEPLOY_KEY=<deploy-key>
81+
SUBGRAPH_NETWORK_NAME=<network-name>
82+
VERSION_LABEL=<version-label>
83+
```
84+
85+
2. Deploy using the npm script:
86+
87+
```bash
88+
npm run deploy-studio
89+
```
90+
91+
### Self-hosted subgraph deployment
92+
93+
The subgraph is deployed via a generated Docker image.
94+
95+
#### Build image
6496

6597
```sh
6698
docker build -f docker/Dockerfile . -t poco-subgraph-deployer
6799
```
68100

69-
### Usage
101+
#### Usage
70102

71103
env:
72104

@@ -82,11 +114,11 @@ docker run --rm \
82114
poco-subgraph-deployer
83115
```
84116

85-
## Deployment Configuration
117+
#### Github Actions pipeline deployment
86118

87-
### Jenkins Pipeline Deployment
119+
The subgraph can be deployed using Github Actions (recommended). The dedicated job can be triggered with the desired configuration (environment, version, ...).
88120

89-
The project uses a Jenkins pipeline for automated deployment of the subgraph. The deployment can be triggered through Jenkins with interactive parameter selection.
121+
### Deployment configuration
90122

91123
#### Available Parameters
92124

@@ -129,21 +161,13 @@ To add support for a new network, update the `networks.json` file with the netwo
129161
}
130162
```
131163

132-
Also, update the Jenkins pipeline choices to include the new network:
133-
134-
```groovy
135-
choice(
136-
name: 'networkName',
137-
choices: ['bellecour', 'new-network'],
138-
description: 'Select the target network'
139-
)
140-
```
164+
## Changelog
141165

142-
The deployment process will automatically generate the appropriate subgraph configuration using the network-specific addresses and start blocks from `networks.json`.
166+
Changes to this project are tracked in [CHANGELOG.md](./CHANGELOG.md)
143167

144168
## Resources
145169

146-
- [thegraph docs](https://thegraph.com/docs/en/)
170+
- [The Graph docs](https://thegraph.com/docs/en/)
147171

148172
## TODO
149173

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iexec/subgraph",
3-
"version": "2.0.0",
3+
"version": "1.1.0",
44
"author": "iExec",
55
"type": "module",
66
"license": "Apache-2.0",
@@ -27,13 +27,13 @@
2727
"prettier --write"
2828
]
2929
},
30-
"homepage": "https://github.com/iExecBlockchainComputing/PoCo-subgraph.git#readme",
30+
"homepage": "https://github.com/iExecBlockchainComputing/PoCo-subgraph#readme",
3131
"repository": {
3232
"type": "git",
3333
"url": "git+https://github.com/iExecBlockchainComputing/PoCo-subgraph.git"
3434
},
3535
"bugs": {
36-
"url": "https://github.com/iExecBlockchainComputing/PoCo-subgraph.git/issues"
36+
"url": "https://github.com/iExecBlockchainComputing/PoCo-subgraph/issues"
3737
},
3838
"devDependencies": {
3939
"@apollo/client": "^3.11.8",
@@ -58,4 +58,4 @@
5858
"dependencies": {
5959
"@iexec/poco": "^5.5.0"
6060
}
61-
}
61+
}

release-please-config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
"packages": {
33
".": {
44
"release-type": "node",
5+
"changelog-path": "CHANGELOG.md",
56
"include-v-in-tag": true,
67
"include-component-in-tag": false,
7-
"changelog-path": "CHANGELOG.md"
8+
"prerelease": false,
9+
"prerelease-type": "rc",
10+
"versioning": "default"
811
}
912
},
1013
"changelog-sections": [

0 commit comments

Comments
 (0)