-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/release-v2' into sameer/raz-99…
…4-fix-tests-in-v2-release
- Loading branch information
Showing
8 changed files
with
3,302 additions
and
5,531 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,111 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
- "release*" | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
install_dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Install dependencies | ||
run: | | ||
npm install | ||
npm run cp-ci-env | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: persist | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
- name: Run tests | ||
run: | | ||
CI=true npm run test | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test | ||
path: test | ||
|
||
scenarios: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
- name: Run scenarios | ||
run: | | ||
CI=true npm run scenarios | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: scenarios | ||
path: scenarios | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
- name: Run Lint | ||
run: npm run lint | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lint | ||
path: lint | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
- name: Run Coverage | ||
run: npm run coverage | ||
- name: Upload coverage to Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage | ||
path: coverage | ||
|
||
slither: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
- name: Run Slither | ||
uses: crytic/[email protected] | ||
id: slither | ||
with: | ||
node-version: 16 | ||
sarif: results.sarif | ||
fail-on: high |
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,22 +1,31 @@ | ||
name: Release | ||
name: Release Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- "next" | ||
tags: | ||
- v* | ||
jobs: | ||
build: | ||
publish-npm-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "16.x" | ||
- run: yarn cp-ci-env | ||
- run: yarn install | ||
- run: yarn run hardhat export-abi | ||
- run: yarn semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RAZORNETWORKBOT }} | ||
NPM_TOKEN: ${{ secrets.RAZORDEPLOYER }} | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
registry-url: "https://registry.npmjs.org" | ||
- run: yarn cp-ci-env | ||
- run: | | ||
PKG_VERSION=$(node -p "require('./package.json').version") | ||
TAG_VERSION=${GITHUB_REF#refs/tags/v} | ||
if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then | ||
echo "Package version ($PKG_VERSION) does not match tag version ($TAG_VERSION)" | ||
exit 1 | ||
fi | ||
- run: yarn install | ||
- run: yarn run hardhat export-abi | ||
- run: npm publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RAZORNETWORKBOT }} | ||
NPM_TOKEN: ${{ secrets.RAZORDEPLOYER }} |
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,96 +1,95 @@ | ||
{ | ||
"name": "@razor-network/contracts", | ||
"version": "1.0.1", | ||
"description": "These are the contracts for Razor network testnet", | ||
"author": "Razor Network", | ||
"private": false, | ||
"files": [ | ||
"abi/**/*", | ||
"contracts/**/*" | ||
], | ||
"scripts": { | ||
"cp-ci-env": "cp .env.ci .env", | ||
"compile": "npx hardhat compile", | ||
"codechecks": "npx codechecks", | ||
"coverage": "hardhat coverage && npm run coverage:check", | ||
"coverage:check": "istanbul check-coverage --statements 90 --branches 60 --functions 85 --lines 86", | ||
"start:local": "./node_modules/.bin/hardhat node", | ||
"deploy": "./scripts/deploy.sh", | ||
"lint": "npm run lint:sol && npm run lint:js", | ||
"lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", | ||
"lint:js": "eslint \"**/*.js\"", | ||
"lint:js:fix": "eslint --fix . \"**/*.js\"", | ||
"lint:sol": "solhint 'contracts/**/*.sol'", | ||
"lint:sol:fix": "prettier 'contracts/**/*.sol' -w", | ||
"test": "hardhat test", | ||
"scenarios": "hardhat test scenarios/scenarios.js", | ||
"gas": "CI=true npm run test && node scripts/gasAnalyze.js", | ||
"gasCompare": "node scripts/gasCompare.js", | ||
"postinstall": "husky install", | ||
"prepack": "pinst --disable", | ||
"postpack": "pinst --enable" | ||
}, | ||
"release": { | ||
"plugins": [ | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
"@semantic-release/git", | ||
"@semantic-release/github" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/razor-network/contracts.git" | ||
}, | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/razor-network/contracts/issues" | ||
}, | ||
"homepage": "https://github.com/razor-network/contracts#readme", | ||
"dependencies": { | ||
"@openzeppelin/contracts": "4.5.0", | ||
"@primitivefi/hardhat-dodoc": "^0.1.3", | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/git": "^10.0.1", | ||
"circleci-pr-commenter": "^0.1.2", | ||
"fs": "^0.0.1-security", | ||
"hardhat-abi-exporter": "^2.3.0", | ||
"json-to-markdown-table": "^1.0.0", | ||
"jsonfile": "^6.1.0", | ||
"semantic-release": "^19.0.2" | ||
}, | ||
"devDependencies": { | ||
"@codechecks/client": "^0.1.11", | ||
"@commitlint/cli": "^16.2.1", | ||
"@commitlint/config-conventional": "^16.2.1", | ||
"@nomiclabs/hardhat-ethers": "^2.0.6", | ||
"@nomiclabs/hardhat-etherscan": "^2.1.6", | ||
"@nomiclabs/hardhat-truffle5": "^2.0.0", | ||
"@nomiclabs/hardhat-web3": "^2.0.0", | ||
"@tenderly/hardhat-tenderly": "^1.0.12", | ||
"axios": "^0.24.0", | ||
"chai": "^4.3.4", | ||
"coveralls": "^3.1.1", | ||
"dotenv": "10.0.0", | ||
"elliptic": "^6.5.4", | ||
"eslint": "^7.32.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.24.2", | ||
"ethers": "^5.6.8", | ||
"get-json": "^1.0.1", | ||
"hardhat": "^2.9.7", | ||
"hardhat-gas-reporter": "1.0.4", | ||
"husky": "^7.0.4", | ||
"pinst": "^3.0.0", | ||
"prettier": "^2.3.2", | ||
"prettier-plugin-solidity": "^1.0.0-beta.17", | ||
"solhint": "~3.3.6", | ||
"solhint-plugin-prettier": "^0.0.5", | ||
"solidity-coverage": "^0.7.17" | ||
}, | ||
"engines": { | ||
"node": ">=16" | ||
"name": "@razor-network/contracts", | ||
"version": "2.0.0", | ||
"description": "These are the contracts for Razor network testnet", | ||
"author": "Razor Network", | ||
"private": false, | ||
"files": [ | ||
"abi/**/*", | ||
"contracts/**/*" | ||
], | ||
"scripts": { | ||
"cp-ci-env": "cp .env.ci .env", | ||
"compile": "npx hardhat compile", | ||
"codechecks": "npx codechecks", | ||
"coverage": "hardhat coverage && npm run coverage:check", | ||
"coverage:check": "istanbul check-coverage --statements 90 --branches 60 --functions 85 --lines 86", | ||
"start:local": "./node_modules/.bin/hardhat node", | ||
"deploy": "./scripts/deploy.sh", | ||
"lint": "npm run lint:sol && npm run lint:js", | ||
"lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", | ||
"lint:js": "eslint \"**/*.js\"", | ||
"lint:js:fix": "eslint --fix . \"**/*.js\"", | ||
"lint:sol": "solhint 'contracts/**/*.sol'", | ||
"lint:sol:fix": "prettier 'contracts/**/*.sol' -w", | ||
"test": "hardhat test", | ||
"scenarios": "hardhat test scenarios/scenarios.js", | ||
"gas": "CI=true npm run test && node scripts/gasAnalyze.js", | ||
"gasCompare": "node scripts/gasCompare.js", | ||
"postinstall": "husky install", | ||
"prepack": "pinst --disable", | ||
"postpack": "pinst --enable" | ||
}, | ||
"release": { | ||
"plugins": [ | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
"@semantic-release/git", | ||
"@semantic-release/github" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/razor-network/contracts.git" | ||
}, | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/razor-network/contracts/issues" | ||
}, | ||
"homepage": "https://github.com/razor-network/contracts#readme", | ||
"dependencies": { | ||
"@openzeppelin/contracts": "4.7.3", | ||
"@primitivefi/hardhat-dodoc": "^0.1.3", | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/git": "^10.0.1", | ||
"fs": "^0.0.1-security", | ||
"hardhat": "^2.11.0", | ||
"hardhat-abi-exporter": "^2.3.0", | ||
"hardhat-deploy": "^0.11.4", | ||
"json-to-markdown-table": "^1.0.0", | ||
"jsonfile": "^6.1.0", | ||
"semantic-release": "^19.0.2" | ||
}, | ||
"devDependencies": { | ||
"@codechecks/client": "^0.1.11", | ||
"@commitlint/cli": "^16.2.1", | ||
"@commitlint/config-conventional": "^16.2.1", | ||
"@nomiclabs/hardhat-ethers": "^2.0.6", | ||
"@nomiclabs/hardhat-etherscan": "^2.1.6", | ||
"@tenderly/hardhat-tenderly": "^1.0.12", | ||
"axios": "^0.24.0", | ||
"chai": "^4.3.4", | ||
"coveralls": "^3.1.1", | ||
"dotenv": "10.0.0", | ||
"elliptic": "^6.5.4", | ||
"eslint": "^7.32.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.24.2", | ||
"ethers": "^5.6.8", | ||
"get-json": "^1.0.1", | ||
"hardhat-gas-reporter": "1.0.4", | ||
"husky": "^7.0.4", | ||
"pinst": "^3.0.0", | ||
"prettier": "^2.3.2", | ||
"prettier-plugin-solidity": "^1.0.0-beta.17", | ||
"solhint": "~3.3.6", | ||
"solhint-plugin-prettier": "^0.0.5", | ||
"solidity-coverage": "^0.8.0" | ||
}, | ||
"engines": { | ||
"node": ">=16" | ||
} | ||
} | ||
} | ||
Oops, something went wrong.