Skip to content

Commit

Permalink
Merge branch 'ultra' of https://github.com/boolnetwork/boolscan into …
Browse files Browse the repository at this point in the history
…br-customized-retrofits-ultra

* 'ultra' of https://github.com/boolnetwork/boolscan: (1135 commits)
  Games (blockscout#2338)
  pools pages (blockscout#2468)
  Advanced filter (blockscout#1905)
  Call the API logout endpoint when the user logs out (blockscout#2469)
  Update Merits dashboard (blockscout#2456)
  Migrate from `web3modal` to `reown` (blockscout#2321)
  Support CDN for NFT images (blockscout#2461)
  change default description (blockscout#2470)
  Replace system selectors with Blockscout selectors style (blockscout#2451)
  [skip ci] fix favicon generator dev script
  fix(deploy-script): favicon generator (blockscout#2466)
  Support verification of Stylus contracts (blockscout#2450)
  fix block miner highlight style (blockscout#2459)
  SEO Tweaks for Gas Tracker Page (blockscout#2344)
  ReCaptcha: migrate back to v2 solution (blockscout#2446)
  Zilliqa: filter for Scilla contracts (blockscout#2449)
  Add Nouns pfps (blockscout#2447)
  Remove Canny from footer section (blockscout#2442)
  Scroll views (blockscout#2418)
  Improve grammar, capitalization, and consistency (blockscout#2432)
  ...

# Conflicts:
#	.eslintrc.js
#	.gitignore
#	configs/app/chain.ts
#	configs/app/ui.ts
#	configs/app/utils.ts
#	configs/envs/.env.main
#	deploy/tools/envs-validator/schema.ts
#	docs/ENVS.md
#	icons/clock-light.svg
#	icons/empty_search_result.svg
#	icons/wallet.svg
#	lib/api/buildUrl.ts
#	lib/api/resources.ts
#	lib/api/useApiQuery.tsx
#	lib/hooks/useFetch.tsx
#	lib/hooks/useNavItems.tsx
#	lib/metadata/getPageOgType.ts
#	lib/metadata/templates/description.ts
#	lib/metadata/templates/title.ts
#	lib/mixpanel/getPageType.ts
#	nextjs/nextjs-routes.d.ts
#	package.json
#	public/favicon/apple-touch-icon.png
#	public/favicon/favicon-16x16.png
#	public/favicon/favicon-32x32.png
#	public/favicon/favicon.ico
#	public/favicon_back/apple-touch-icon-120x120.png
#	public/favicon_back/apple-touch-icon-152x152.png
#	public/favicon_back/apple-touch-icon-180x180.png
#	public/favicon_back/apple-touch-icon-60x60.png
#	public/favicon_back/apple-touch-icon-76x76.png
#	public/favicon_back/safari-pinned-tab.svg
#	public/icons/name.d.ts
#	stubs/utils.ts
#	theme/foundations/colors.ts
#	types/api/transaction.ts
#	ui/address/contract/ContractConnectWallet.tsx
#	ui/home/Stats.tsx
#	ui/home/StatsItem.tsx
#	ui/home/indicators/ChainIndicators.tsx
#	ui/home/indicators/utils/indicators.tsx
#	ui/pages/Home.tsx
#	ui/shared/DetailsInfoItem.tsx
#	ui/shared/GasInfoTooltipContent/GasInfoRow.tsx
#	ui/shared/pagination/useQueryWithPages.ts
#	ui/snippets/footer/Footer.tsx
#	ui/snippets/navigation/vertical/NavigationDesktop.tsx
#	ui/snippets/searchBar/SearchBarInput.tsx
#	ui/snippets/topBar/ColorModeSwitch.tsx
#	ui/snippets/topBar/ColorModeSwitchTheme.tsx
#	ui/snippets/topBar/TopBarStats.tsx
#	ui/snippets/walletMenu/WalletMenuDesktop.tsx
#	ui/stats/NumberWidget.tsx
#	ui/stats/NumberWidgetsList.tsx
#	ui/stats/StatsDropdownMenu.tsx
#	ui/tx/TxInternals.tsx
#	ui/tx/internals/TxInternalsList.tsx
#	ui/tx/internals/TxInternalsTable.tsx
#	ui/txs/TxType.tsx
#	ui/txs/TxsTableItem.tsx
#	yarn.lock
  • Loading branch information
w875050772 committed Dec 23, 2024
2 parents e712eca + 3a400a1 commit d2d1f65
Show file tree
Hide file tree
Showing 3,099 changed files with 87,004 additions and 31,506 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 3 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
NEXT_PUBLIC_SENTRY_DSN=https://sentry.io
SENTRY_CSP_REPORT_URI=https://sentry.io
NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN=xxx
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=xxx
NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY=xxx
NEXT_PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID=UA-XXXXXX-X
NEXT_PUBLIC_MIXPANEL_PROJECT_TOKEN=xxx
NEXT_PUBLIC_GROWTH_BOOK_CLIENT_KEY=xxx
NEXT_PUBLIC_AUTH0_CLIENT_ID=xxx
FAVICON_GENERATOR_API_KEY=xxx
NEXT_PUBLIC_GROWTH_BOOK_CLIENT_KEY=xxx
NEXT_PUBLIC_GROWTH_BOOK_CLIENT_KEY=xxx
NEXT_PUBLIC_MARKETPLACE_RATING_AIRTABLE_API_KEY=xxx
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/chakra-npm-publisher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish Chakra theme package to NPM

on:
workflow_dispatch:
inputs:
version:
description: Package version
type: string
required: true
workflow_call:
inputs:
version:
description: Package version
type: string
required: true

jobs:
publish:
runs-on: ubuntu-latest
name: Publish package to NPM registry
permissions:
id-token: write

steps:
- name: Checkout repo
uses: actions/checkout@v4

# Also it will setup .npmrc file to publish to npm
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '22.11.0'
registry-url: 'https://registry.npmjs.org'

- name: Update package version
run: |
cd ./theme
npm version ${{ inputs.version }}
- name: Build the package
run: |
yarn
cd ./theme
yarn
yarn build
- name: Publish to NPM registry
run: |
cd ./theme
npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
83 changes: 70 additions & 13 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.11.0
node-version: 22.11.0
cache: 'yarn'

- name: Cache node_modules
Expand All @@ -43,7 +43,7 @@ jobs:

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile --ignore-optional
run: yarn --frozen-lockfile

- name: Run ESLint
run: yarn lint:eslint
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.11.0
node-version: 22.11.0
cache: 'yarn'

- name: Cache node_modules
Expand All @@ -75,10 +75,10 @@ jobs:

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile --ignore-optional
run: yarn --frozen-lockfile

- name: Install script dependencies
run: cd ./deploy/tools/envs-validator && yarn --frozen-lockfile --ignore-optional
run: cd ./deploy/tools/envs-validator && yarn --frozen-lockfile

- name: Run validation tests
run: |
Expand All @@ -95,11 +95,13 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.11.0
node-version: 22.11.0
cache: 'yarn'

- name: Cache node_modules
Expand All @@ -112,17 +114,64 @@ jobs:

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile --ignore-optional
run: yarn --frozen-lockfile

- name: Run Jest
run: yarn test:jest
run: yarn test:jest ${{ github.event_name == 'pull_request' && '--changedSince=origin/main' || '' }} --passWithNoTests

pw_affected_tests:
name: Resolve affected Playwright tests
runs-on: ubuntu-latest
needs: [ code_quality, envs_validation ]
if: github.event_name == 'pull_request'
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22.11.0
cache: 'yarn'

- name: Cache node_modules
uses: actions/cache@v4
id: cache-node-modules
with:
path: |
node_modules
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile

- name: Install script dependencies
run: cd ./deploy/tools/affected-tests && yarn --frozen-lockfile

- name: Run script
run: yarn test:pw:detect-affected

- name: Upload result file
uses: actions/upload-artifact@v4
with:
name: playwright-affected-tests
path: ./playwright/affected-tests.txt
retention-days: 3

pw_tests:
name: 'Playwright tests / Project: ${{ matrix.project }}'
needs: [ code_quality, envs_validation ]
needs: [ code_quality, envs_validation, pw_affected_tests ]
if: |
always() &&
needs.code_quality.result == 'success' &&
needs.envs_validation.result == 'success' &&
(needs.pw_affected_tests.result == 'success' || needs.pw_affected_tests.result == 'skipped')
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.41.1-focal
image: mcr.microsoft.com/playwright:v1.49.0-noble

strategy:
fail-fast: false
Expand All @@ -141,7 +190,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.11.0
node-version: 22.11.0
cache: 'yarn'

- name: Cache node_modules
Expand All @@ -154,10 +203,18 @@ jobs:

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile --ignore-optional
run: yarn --frozen-lockfile

- name: Download affected tests list
if: ${{ needs.pw_affected_tests.result == 'success' }}
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: playwright-affected-tests
path: ./playwright

- name: Run PlayWright
run: yarn test:pw:ci
run: yarn test:pw:ci --affected=${{ github.event_name == 'pull_request' }} --pass-with-no-tests
env:
HOME: /root
PW_PROJECT: ${{ matrix.project }}
Expand Down
116 changes: 116 additions & 0 deletions .github/workflows/copy-issues-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Copy issues labels to pull request

on:
workflow_dispatch:
inputs:
pr_number:
description: Pull request number
required: true
type: string
issues:
description: JSON encoded list of issue ids
required: true
type: string
workflow_call:
inputs:
pr_number:
description: Pull request number
required: true
type: string
issues:
description: JSON encoded list of issue ids
required: true
type: string

jobs:
run:
name: Run
runs-on: ubuntu-latest
steps:
- name: Find unique labels
id: find_unique_labels
uses: actions/github-script@v7
env:
ISSUES: ${{ inputs.issues }}
with:
script: |
const issues = JSON.parse(process.env.ISSUES);
const WHITE_LISTED_LABELS = [
'client feature',
'feature',
'bug',
'dependencies',
'performance',
'chore',
'enhancement',
'refactoring',
'tech',
'ENVs',
]
const labels = await Promise.all(issues.map(getIssueLabels));
const uniqueLabels = uniqueStringArray(labels.flat().filter((label) => WHITE_LISTED_LABELS.includes(label)));
if (uniqueLabels.length === 0) {
core.info('No labels found.\n');
return [];
}
core.info(`Found following labels: ${ uniqueLabels.join(', ') }.\n`);
return uniqueLabels;
async function getIssueLabels(issue) {
core.info(`Obtaining labels list for the issue #${ issue }...`);
try {
const response = await github.request('GET /repos/{owner}/{repo}/issues/{issue_number}/labels', {
owner: 'blockscout',
repo: 'frontend',
issue_number: issue,
});
return response.data.map(({ name }) => name);
} catch (error) {
core.error(`Failed to obtain labels for the issue #${ issue }: ${ error.message }`);
return [];
}
}
function uniqueStringArray(array) {
return Array.from(new Set(array));
}
- name: Update pull request labels
id: update_pr_labels
uses: actions/github-script@v7
env:
LABELS: ${{ steps.find_unique_labels.outputs.result }}
PR_NUMBER: ${{ inputs.pr_number }}
with:
script: |
const labels = JSON.parse(process.env.LABELS);
const prNumber = Number(process.env.PR_NUMBER);
if (labels.length === 0) {
core.info('Nothing to update.\n');
return;
}
for (const label of labels) {
await addLabelToPr(prNumber, label);
}
core.info('Done.\n');
async function addLabelToPr(prNumber, label) {
console.log(`Adding label to the pull request #${ prNumber }...`);
return await github.request('POST /repos/{owner}/{repo}/issues/{issue_number}/labels', {
owner: 'blockscout',
repo: 'frontend',
issue_number: prNumber,
labels: [ label ],
});
}
34 changes: 10 additions & 24 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ on:
push:
branches:
- main
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.husky/**'
- '.vscode/**'
- 'docs/**'
- 'jest/**'
- 'mocks/**'
- 'playwright/**'
- 'stubs/**'
- 'tools/**'
workflow_dispatch:

concurrency:
Expand All @@ -15,27 +25,3 @@ jobs:
name: Publish Docker image
uses: './.github/workflows/publish-image.yml'
secrets: inherit

deploy_main:
name: Deploy frontend
needs: publish_image
uses: blockscout/blockscout-ci-cd/.github/workflows/deploy_helmfile.yaml@master
with:
appName: front
globalEnv: main
helmfileDir: deploy
kubeConfigSecret: ci/data/dev/kubeconfig/k8s-dev
vaultRole: ci-dev
secrets: inherit

deploy_l2:
name: Deploy frontend (L2)
needs: publish_image
uses: blockscout/blockscout-ci-cd/.github/workflows/deploy_helmfile.yaml@master
with:
appName: l2-optimism-goerli
globalEnv: optimism-goerli
helmfileDir: deploy
kubeConfigSecret: ci/data/dev/kubeconfig/k8s-dev
vaultRole: ci-dev
secrets: inherit
Loading

0 comments on commit d2d1f65

Please sign in to comment.