-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from SmartInvoiceXYZ/154-dapp-refactor-23
dApp Refactor '23
- Loading branch information
Showing
323 changed files
with
55,980 additions
and
41,403 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
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,54 @@ | ||
name: DApp CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
paths: | ||
- packages/dapp/** | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
paths: | ||
- packages/dapp/** | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
with: | ||
# We need to fetch all branches and commits so that Nx affected has a base to compare against. | ||
fetch-depth: 0 | ||
|
||
- name: Set up node using nvm | ||
uses: dcodeIO/setup-node-nvm@v5 | ||
with: | ||
node-version: 18 | ||
|
||
# - name: "Copy config" | ||
# run: | | ||
# mv ./evm/.env.github ./evm/.env | ||
# echo "::debug::$(less .env)" | ||
|
||
- name: Install the dependencies | ||
run: pnpm install | ||
|
||
- name: Lint the code | ||
run: pnpm dapp:lint | ||
|
||
- name: Add lint summary | ||
run: | | ||
echo "## Lint results" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | ||
- name: Test the code and generate the coverage report | ||
run: pnpm dapp:test | ||
|
||
- name: Add test summary | ||
run: | | ||
echo "## Test results" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY |
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 +1 @@ | ||
lts/gallium | ||
lts/iron |
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 +1,72 @@ | ||
packages/subgraph/subgraph.template.yaml | ||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# testing | ||
coverage | ||
lib-cov | ||
coverage.json | ||
|
||
# production | ||
build | ||
build/Release | ||
generated | ||
cache | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# environment variables | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env | ||
|
||
# logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# swap | ||
*.sw[a-z] | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# optional npm cache directory | ||
.npm | ||
|
||
# yarn Integrity file | ||
.yarn-integrity | ||
|
||
# editor | ||
.history | ||
.vscode | ||
|
||
# misc | ||
.DS_Store | ||
|
||
# subgraph | ||
packages/subgraph/src/types | ||
|
||
# yarn version | ||
.yarn* | ||
|
||
# firebase tmp | ||
.firebase/ | ||
|
||
/packages/contracts/flat/ | ||
/packages/dapp/.next/ | ||
|
||
# next.js | ||
.next | ||
packages/subgraph/subgraph.template.yaml |
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,6 +1,8 @@ | ||
#### CONTRACTS | ||
|
||
INFURA_PROJECT_ID= | ||
PRIVATE_KEY= | ||
ETHERSCAN_API_KEY= | ||
COINMARKETCAP_API_KEY= | ||
CURRENCY= | ||
POLYGONSCAN_API_KEY= | ||
POLYGONSCAN_API_KEY= |
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 @@ | ||
/* eslint-disable import/no-default-export */ | ||
import type { Config } from 'jest'; | ||
import nextJest from 'next/jest.js'; | ||
|
||
const createJestConfig = nextJest({ | ||
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment | ||
dir: './packages/dapp', | ||
}); | ||
|
||
const config: Config = { | ||
coverageProvider: 'v8', | ||
projects: [ | ||
{ | ||
preset: 'ts-jest', | ||
rootDir: './packages/dapp', | ||
setupFilesAfterEnv: ['<rootDir>/test/setupTests.ts'], | ||
testEnvironment: 'jsdom', | ||
testMatch: ['<rootDir>/test/**/*.test.(ts|tsx|js|jsx)'], | ||
transform: { | ||
'^.+\\.(js|jsx|ts|tsx)$': [ | ||
'ts-jest', | ||
{ | ||
tsconfig: '<rootDir>/tsconfig.test.json', | ||
}, | ||
], | ||
}, | ||
transformIgnorePatterns: ['node_modules/(?!(viem|isows)/)'], | ||
}, | ||
], | ||
verbose: true, | ||
}; | ||
|
||
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async | ||
export default createJestConfig(config); |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"] | ||
} |
Oops, something went wrong.