Skip to content

Commit 001b887

Browse files
Merge pull request #32 from iExecBlockchainComputing/release/1.1.0
Release v1.1.0 - Support deal sponsor
2 parents cacdd58 + 157d280 commit 001b887

32 files changed

+4505
-6635
lines changed

.github/workflows/coverage.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- develop
5+
- main
6+
7+
jobs:
8+
coverage:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
- name: Init
14+
run: npm ci
15+
- name: Run Coverage
16+
run: (npm run coverage 2>&1) | tee /tmp/coverage.out | cat
17+
- name: Extract coverage
18+
run: echo "COVERAGE=$(cat /tmp/coverage.out | grep "Global test coverage")" >> $GITHUB_ENV
19+
- name: Display coverage in Github PR checks
20+
# See https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#create-a-check-run
21+
# and https://www.kenmuse.com/blog/creating-github-checks/
22+
env:
23+
GH_TOKEN: ${{ github.token }}
24+
run: | # TODO: Set "failure" conclusion if coverage is too low
25+
curl -L -X POST \
26+
-H "Accept: application/vnd.github+json" \
27+
-H "Authorization: Bearer $GH_TOKEN"\
28+
-H "X-GitHub-Api-Version: 2022-11-28" \
29+
https://api.github.com/repos/${{ github.repository }}/check-runs \
30+
-d '{"name":"Coverage ratio", "head_sha":"${{ github.event.pull_request.head.sha }}", "status":"completed", "conclusion":"success", "output":{"title":"${{env.COVERAGE}}", "summary":""}}'
31+

.github/workflows/main.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
push:
3+
branches:
4+
- feature/*
5+
- bugfix/*
6+
- develop
7+
- release/*
8+
- hotfix/*
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-22.04 # For 24.04+, see https://github.com/graphprotocol/graph-tooling/issues/1546#issuecomment-2589680195
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Init
18+
run: npm ci
19+
- name: Run unit tests
20+
run: npm run test
21+
- name: Test build
22+
run: npm run build
23+
# See Jenkinsfile-itest for "Run integration tests" step

.github/workflows/nodejs.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ node_modules
22
build
33
generated
44
yarn.lock
5+
test/.bin
6+
subgraph.yaml
7+
subgraph.test.yaml

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lint-staged

.mocharc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extension": ["ts"],
3+
"spec": "itest/**/*.ts",
4+
"require": ["ts-node/register"],
5+
"timeout": 1000000
6+
}

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"tabWidth": 4,
5+
"trailingComma": "all",
6+
"endOfLine": "auto",
7+
"plugins": [
8+
"prettier-plugin-organize-imports"
9+
]
10+
}

CHANGELOG.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file.
4-
5-
## next
6-
7-
### Added
8-
9-
### Changed
10-
11-
### Removed
12-
13-
## 1.0.0 - initial release
3+
## v1.1.0 - Support deal sponsor
4+
- Add `sponsor` to `deal`. (#31)
5+
- Update deployment hosts:
6+
- production (#30)
7+
- staging (#29)
8+
- Display coverage in Github PR checks. (#26)
9+
- Add integration test suite. (#21)
10+
- Add unit test suite. (#20)
11+
12+
## v1.0.0 - initial release
1413

1514
### features
1615

Jenkinsfile-itest

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
node('docker') {
2+
stage('Clone') {
3+
cleanWs()
4+
checkoutInfo = checkout(scm)
5+
echo "git checkout: ${checkoutInfo}"
6+
}
7+
stage('Pull images') {
8+
withCredentials([
9+
usernamePassword(credentialsId: 'docker-regis',
10+
usernameVariable: 'username', passwordVariable: 'password')
11+
]) {
12+
def registry = 'docker-regis.iex.ec'
13+
try {
14+
sh "echo -n '${password}' | docker login --username '${username}' --password-stdin ${registry}"
15+
sh 'cd docker/test/ && docker compose pull chain'
16+
} finally {
17+
sh "docker logout ${registry}"
18+
}
19+
}
20+
}
21+
docker.image('node:22-alpine')
22+
.inside('-v /var/run/docker.sock:/var/run/docker.sock --network=host --user=root') {
23+
stage('Init') {
24+
sh 'apk add docker docker-compose' // TODO: Use already built image for a faster job execution
25+
sh 'npm ci'
26+
}
27+
stage('Integration tests') {
28+
sh 'npm run itest'
29+
}
30+
}
31+
}

Jenkinsfile_Subgraph_bellecour

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
//Readme @ http://gitlab.iex.ec:30000/iexec/jenkins-library
22

3-
@Library('global-jenkins-library@2.7.7') _
3+
@Library('global-jenkins-library@2.8.1') _
44
deploySubGraph(
5-
targetRemoteHost : 'azubgrpbp-thegraph-bellecour.public.az2.internal',
5+
targetRemoteHostGraphNode : 'azubgrpbp-thegraph.public.az2.internal',
6+
targetRemoteHostIPFS : 'ipfs-upload.v8-bellecour.iex.ec',
67
subgraphFolder: './',
78
subgraphFilename: 'subgraph.bellecour.yaml',
8-
subgraphVersionLabel: 'v1.0.0-rc.1',
9+
subgraphVersionLabel: 'v1.1.0',
910
subgraphLabel: 'bellecour/poco-v5'
1011
)

0 commit comments

Comments
 (0)