From 84935c7094a3c8937baa2d7b347cab6e2b204f9c Mon Sep 17 00:00:00 2001 From: mcieric Date: Thu, 9 Oct 2025 13:31:50 +0200 Subject: [PATCH 1/4] docs: improve README quickstart --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 38e38d6..859957a 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,23 @@ Talent Protocol uses the graph to aggregate and calculate some metrics to make i - Project homepage: https://talentprotocol.com - Twitter: https://twitter.com/talentprotocol - LinkedIn: https://linkedin.com/company/talentprotocol/ + +## Quickstart + +```bash +# Clone the repo +git clone https://github.com/talentprotocol/subgraph.git +cd subgraph + +# Install dependencies +corepack enable +yarn install + +# Generate types +yarn codegen + +# Build +yarn build + +# Optional: deploy to local or testnet +yarn deploy From 59566c463a590c120c59d60b4fbcc7ab78d5e2fb Mon Sep 17 00:00:00 2001 From: mcieric Date: Thu, 9 Oct 2025 14:20:26 +0200 Subject: [PATCH 2/4] ci: add Subgraph basic workflow --- .github/workflows/subgraph-ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/subgraph-ci.yml diff --git a/.github/workflows/subgraph-ci.yml b/.github/workflows/subgraph-ci.yml new file mode 100644 index 0000000..192cdaa --- /dev/null +++ b/.github/workflows/subgraph-ci.yml @@ -0,0 +1,23 @@ +name: Subgraph CI + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Codegen + run: yarn codegen || echo "Skip if no codegen" + + - name: Build + run: yarn build || echo "Skip if no build" From 7e8b0388206cd6dba079c151082ae9ade2583974 Mon Sep 17 00:00:00 2001 From: mcieric Date: Thu, 9 Oct 2025 14:37:45 +0200 Subject: [PATCH 3/4] ci: add Hello World workflow --- .github/workflows/subgraph-ci.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/subgraph-ci.yml b/.github/workflows/subgraph-ci.yml index 192cdaa..fb294d7 100644 --- a/.github/workflows/subgraph-ci.yml +++ b/.github/workflows/subgraph-ci.yml @@ -1,23 +1,16 @@ -name: Subgraph CI +name: Subgraph CI Test on: push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] + branches: + - fix/readme # ne s’exécute que sur ta branche de test jobs: - build: + hello-world: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Codegen - run: yarn codegen || echo "Skip if no codegen" - - - name: Build - run: yarn build || echo "Skip if no build" + - name: Say Hello + run: echo "✅ Hello World from GitHub Actions!" From 12d11f3380c5172f573a4fc06dbd376c6bf2ba70 Mon Sep 17 00:00:00 2001 From: mcieric Date: Thu, 9 Oct 2025 14:41:43 +0200 Subject: [PATCH 4/4] ci: add multi-node build (install/lint/codegen/build/test) --- .github/workflows/subgraph-ci.yml | 45 ++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/.github/workflows/subgraph-ci.yml b/.github/workflows/subgraph-ci.yml index fb294d7..a24abaf 100644 --- a/.github/workflows/subgraph-ci.yml +++ b/.github/workflows/subgraph-ci.yml @@ -1,16 +1,47 @@ -name: Subgraph CI Test +name: Subgraph CI on: + pull_request: + branches: [ master ] # PR vers le repo upstream push: - branches: - - fix/readme # ne s’exécute que sur ta branche de test + branches: [ master ] # push sur ta branche master (fork) + workflow_dispatch: # lancement manuel si besoin jobs: - hello-world: + build: + name: Build on Node ${{ matrix.node }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node: [18, 20] # 2 versions = crédible sans être lourd steps: - - name: Checkout repo + - name: Checkout uses: actions/checkout@v4 - - name: Say Hello - run: echo "✅ Hello World from GitHub Actions!" + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: yarn + + - name: Enable Corepack + run: corepack enable + + - name: Install dependencies + run: yarn install --frozen-lockfile || yarn install + + - name: Install Graph CLI (optional) + run: yarn global add @graphprotocol/graph-cli || true + + - name: Lint (if present) + run: yarn lint --if-present + + - name: Codegen (if present) + run: yarn codegen || echo "no codegen script - skipping" + + - name: Build (if present) + run: yarn build || echo "no build script - skipping" + + - name: Test (if present) + run: yarn test --if-present