-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,023 changed files
with
114,735 additions
and
7,797 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,98 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"airbnb", | ||
"airbnb-typescript", | ||
"prettier", | ||
"plugin:prettier/recommended" | ||
], | ||
"plugins": ["testing-library", "@typescript-eslint", "prettier", "vitest"], | ||
"parser": "@typescript-eslint/parser", | ||
"overrides": [ | ||
{ | ||
"files": ["src/**/*.test.[jt]sx?"], | ||
"plugins": ["vitest"], | ||
"extends": ["plugin:vitest/recommended"] | ||
}, | ||
{ | ||
"files": ["functions/**/*"], | ||
"parserOptions": { | ||
"project": "./functions/tsconfig.json" | ||
} | ||
} | ||
], | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"ignorePatterns": [ | ||
"next.config.js", | ||
"deploy/**/*", | ||
"src/**/*.test.tsx", | ||
"src/**/*.test.ts", | ||
"playwright/**/*.ts" | ||
], | ||
"rules": { | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-props-no-spreading": "off", | ||
"react/jsx-filename-extension": [1, { "extensions": [".tsx", ".jsx"] }], | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"js": "never", | ||
"jsx": "never", | ||
"ts": "never", | ||
"tsx": "never" | ||
} | ||
], | ||
"no-console": "off", | ||
"no-restricted-syntax": [ | ||
"error", | ||
{ | ||
"selector": "CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]", | ||
"message": "Unexpected property on console object was called" | ||
}, | ||
{ | ||
"selector": "*[value=/\\b(0x)?[a-f0-9]{64}\\b/i]", | ||
"message": "No private keys allowed" | ||
} | ||
], | ||
"prettier/prettier": "error", | ||
"import/prefer-default-export": "off", | ||
"no-underscore-dangle": "off", | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ | ||
"selector": "default", | ||
"format": ["camelCase", "UPPER_CASE", "PascalCase"], | ||
"leadingUnderscore": "allow", | ||
"trailingUnderscore": "allow" | ||
}, | ||
{ | ||
"selector": "variable", | ||
"format": ["camelCase", "UPPER_CASE", "PascalCase"], | ||
"leadingUnderscore": "allow", | ||
"trailingUnderscore": "allow" | ||
}, | ||
{ | ||
"selector": "property", | ||
"format": ["camelCase", "UPPER_CASE", "PascalCase"], | ||
"leadingUnderscore": "allowSingleOrDouble", | ||
"trailingUnderscore": "allow" | ||
}, | ||
{ | ||
"selector": "typeLike", | ||
"format": ["PascalCase"] | ||
} | ||
], | ||
"radix": "off", | ||
"consistent-return": "off", | ||
"jsx-a11y/anchor-is-valid": "off", | ||
"no-return-assign": "off", | ||
"react/require-default-props": "off", | ||
"react/function-component-definition": "off", | ||
"react/no-unstable-nested-components": ["off", { "allowAsProps": true }], | ||
"react/jsx-no-useless-fragment": "off" | ||
} | ||
} |
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,19 @@ | ||
.yarn/**/* linguist-generated -diff | ||
.yalc/**/* linguist-generated -diff | ||
.pnp.cjs text linguist-generated -diff | ||
.pnp.loader.mjs text linguist-generated -diff | ||
yarn.lock text linguist-generated -diff | ||
yalc.lock text linguist-generated -diff | ||
*.lock text linguist-generated -diff | ||
|
||
# Archives | ||
*.gz binary | ||
*.tar binary | ||
*.zip binary | ||
|
||
# Fonts | ||
*.ttf binary | ||
*.eot binary | ||
*.otf binary | ||
*.woff binary | ||
*.woff2 binary |
80 changes: 80 additions & 0 deletions
80
packages/ens-app-v3/.github/workflows/pages-deployment.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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Cloudflare Pages | ||
|
||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
NEXT_PUBLIC_INTERCOM_ID: re9q5yti | ||
|
||
on: [push] | ||
jobs: | ||
yalc_check: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
can_deploy: ${{ steps.has_yalc.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Yalc | ||
run: npm i -g yalc | ||
|
||
- id: has_yalc | ||
run: | | ||
! yalc check | grep -qe . | ||
deploy: | ||
if: ${{ always() }} | ||
runs-on: ubuntu-latest | ||
needs: [yalc_check] | ||
permissions: | ||
contents: read | ||
deployments: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Misc. Deps | ||
run: sudo apt-get install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ | ||
|
||
- name: Check Yalc | ||
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} | ||
run: if [ ${{ needs.yalc_check.outputs.can_deploy }} != true ]; then exit 1; else exit 0; fi | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8.11.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Build and Export | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: pnpm build && pnpm export | ||
|
||
- name: Build and Export with Profiler | ||
if: ${{ github.ref != 'refs/heads/main' }} | ||
run: pnpm build:preview && pnpm export | ||
|
||
- name: Generate sitemap | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: | | ||
mkdir -p ./out/sitemaps | ||
pnpm generate:sitemaps | ||
- name: Publish | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: ens-app-v3 | ||
directory: out | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | ||
wranglerVersion: '3' | ||
|
||
- name: Submit sitemap | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: curl https://www.google.com/ping\?sitemap=https://app.ens.domains/sitemap.xml |
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,197 @@ | ||
name: Test | ||
|
||
on: [push] | ||
|
||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8.11.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Get contract addresses | ||
run: 'parallel --lb --halt now,success=1,fail=1 ::: \ | ||
"pnpm tenv start -ng -ns -nb" \ | ||
"pnpm wait-on ./.env.local"' | ||
|
||
- run: pnpm test:coverage | ||
|
||
build-stateless: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8.11.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Get contract addresses | ||
run: 'parallel --lb --halt now,success=1,fail=1 ::: \ | ||
"pnpm tenv start -ng -ns -nb" \ | ||
"pnpm wait-on ./.env.local"' | ||
|
||
- name: Build stateless and export | ||
run: pnpm build:glocal && pnpm export | ||
|
||
- name: Tar stateless files | ||
run: tar -cvf stateless-build.tar out | ||
|
||
- name: Upload stateless | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: stateless-build | ||
path: stateless-build.tar | ||
|
||
build-stateful: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8.11.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Build stateful and export | ||
run: pnpm build && pnpm export | ||
|
||
- name: Tar stateful files | ||
run: tar -cvf stateful-build.tar out | ||
|
||
- name: Upload stateful | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: stateful-build | ||
path: stateful-build.tar | ||
|
||
stateless: | ||
name: stateless (${{matrix.shard}}) | ||
needs: build-stateless | ||
timeout-minutes: 20 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8.11.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- run: pnpm rebuild -r | ||
|
||
- name: Download build | ||
id: download | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: stateless-build | ||
|
||
- name: Untar files | ||
run: tar -xvf stateless-build.tar | ||
|
||
- name: Install playwright | ||
run: npx playwright install chromium | ||
|
||
- name: Run tests | ||
run: | | ||
PLAYWRIGHT_SHARD=${{matrix.shard}} PLAYWRIGHT_TOTAL=${{strategy.job-total}} pnpm e2e:ci -nb | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: stateless-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
|
||
stateful: | ||
name: stateful (${{matrix.shard}}) | ||
needs: build-stateful | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
shard: [1, 2, 3] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: ./scripts/check-chrome.sh | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8.11.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- run: pnpm rebuild -r | ||
|
||
- name: Download build | ||
id: download | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: stateful-build | ||
|
||
- name: Untar files | ||
run: tar -xvf stateful-build.tar | ||
|
||
- name: Install playwright | ||
run: npx playwright install chromium | ||
|
||
- name: Run tests | ||
run: | | ||
parallel --lb --halt now,success=1,fail=1 ::: \ | ||
"pnpm wrangle" \ | ||
"pnpm wait-on http://127.0.0.1:8788 && npx playwright test --shard=${{matrix.shard}}/${{strategy.job-total}} --project=stateful" | ||
env: | ||
NEXT_PUBLIC_GRAPH_URI: https://api.thegraph.com/subgraphs/name/tateb/enssubdomaincount | ||
SECRET_WORDS: ${{ secrets.SECRET_WORDS }} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: stateful-report | ||
path: playwright-report/ | ||
retention-days: 30 |
Oops, something went wrong.