-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: convert repo into a yarn workspaces monorepo and add sdk packa…
…ge (#888) * chore: convert repo into a yarn workspaces monorepo Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * chore: add sdk Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * chore: fix cross reference dependencies and add readme Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * ci: fix setup action Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * ci: use yarn v4 Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * ci: add missing property to setup action Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * ci: add more missing properties Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * ci: refactor corepack enable Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * ci: run for all branches and prs Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * ci: fix coverage file path Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * ci: add workflow dispatch trigger Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * chore: trigger ci Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * chore: update README Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * test: fix failing tests Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * chore: minor nits Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * chore: fixup prettier config Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * chore: roll back prettier-plugin-solidity to old version to avoid reformatting Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * chore: bump packages versions and add publish ci action Signed-off-by: Tomás Migone <tomas@edgeandnode.com> * docs: update readme with versioning and publishing instructions Signed-off-by: Tomás Migone <tomas@edgeandnode.com> --------- Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
- Loading branch information
Showing
466 changed files
with
26,546 additions
and
15,067 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Setup | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Enable corepack for modern yarn | ||
shell: bash | ||
run: corepack enable | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
shell: bash | ||
run: yarn --immutable | ||
- name: Build | ||
shell: bash | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Build | ||
|
||
env: | ||
CI: true | ||
|
||
on: | ||
push: | ||
branches: "*" | ||
pull_request: | ||
branches: "*" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
name: Run CI tests | ||
name: CI | ||
|
||
env: | ||
CI: true | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: {} | ||
branches: "*" | ||
paths: | ||
- packages/contracts/** | ||
pull_request: | ||
branches: "*" | ||
paths: | ||
- packages/contracts/** | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
test-ci: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install packages | ||
run: yarn install --non-interactive --frozen-lockfile | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- name: Run tests | ||
run: yarn test:coverage | ||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.json | ||
files: ./packages/contracts/coverage.json | ||
flags: unittests | ||
name: graphprotocol-contracts | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish package to NPM | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
package: | ||
description: 'Package to publish' | ||
required: true | ||
type: choice | ||
options: | ||
- contracts | ||
- sdk | ||
tag: | ||
description: 'Tag to publish' | ||
required: true | ||
type: string | ||
default: latest | ||
|
||
jobs: | ||
publish: | ||
name: Publish package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- name: Publish 🚀 | ||
shell: bash | ||
run: | | ||
pushd packages/${{ inputs.package }} | ||
yarn npm publish --tag ${{ inputs.tag }} --access public | ||
env: | ||
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
# contracts | ||
cd packages/contracts | ||
npx --no-install lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
Oops, something went wrong.