-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: improve package.json and adapted workflows
- Loading branch information
1 parent
76e948b
commit e1baf43
Showing
3 changed files
with
52 additions
and
7 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,47 @@ | ||
name: 'Contracts' | ||
|
||
env: | ||
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} | ||
working-directory: . | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'contracts/**' | ||
- '.github/workflows/contracts-*.yml' | ||
|
||
jobs: | ||
tests: | ||
runs-on: 'ubuntu-latest' | ||
defaults: | ||
run: | ||
working-directory: ${{env.working-directory}} | ||
steps: | ||
- name: 'Check out the repo' | ||
uses: 'actions/checkout@v3' | ||
|
||
- name: 'Install Node.js' | ||
uses: 'actions/setup-node@v3' | ||
with: | ||
cache: 'yarn' | ||
node-version: 16 | ||
|
||
- name: 'Install general dependencies' | ||
run: 'yarn install' | ||
|
||
- name: 'Install contracts dependencies' | ||
run: 'yarn install' | ||
working-directory: contracts | ||
|
||
- name: 'Lint the contracts' | ||
run: 'yarn lint:sol' | ||
working-directory: contracts | ||
|
||
- name: 'Build the contracts' | ||
run: 'yarn build' | ||
working-directory: contracts | ||
|
||
- name: 'Test the contracts and generate the coverage report' | ||
run: 'yarn coverage' | ||
working-directory: contracts |
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 |
---|---|---|
|
@@ -32,12 +32,10 @@ | |
"typescript": "^5.2.2" | ||
}, | ||
"scripts": { | ||
"build": "cd ./contracts && yarn build && cd ../subgraph && yarn build", | ||
"test": "cd ./contracts && yarn test && cd ../subgraph && yarn test", | ||
"lint:ts": "eslint --ignore-path ./.eslintignore --ext .js,.ts .", | ||
"clean": "cd ./contracts && yarn clean && yarn clean && cd ../subgraph && yarn clean", | ||
"test": "yarn --cwd ./subgraph test", | ||
"lint": "eslint --ignore-path ./.eslintignore --ext .js,.ts .", | ||
"clean": "yarn clean && yarn --cwd ./subgraph clean", | ||
"prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yml}\"", | ||
"prettier:write": "prettier --write \"**/*.{js,json,md,sol,ts,yml}\"" | ||
}, | ||
"packageManager": "[email protected]" | ||
} | ||
} |