Skip to content

Commit

Permalink
feat: update v0.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dkdaniz committed Oct 4, 2023
1 parent 9acbf4d commit 5a50b7f
Show file tree
Hide file tree
Showing 410 changed files with 3,232 additions and 3,192 deletions.
7 changes: 3 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
NEXT_PUBLIC_SENTRY_DSN=https://sentry.io
SENTRY_CSP_REPORT_URI=https://sentry.io
NEXT_PUBLIC_SENTRY_DSN=xxx
SENTRY_CSP_REPORT_URI=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_AUTH0_CLIENT_ID=xxx
NEXT_PUBLIC_FAVICON_GENERATOR_API_KEY=xxx
NEXT_PUBLIC_AUTH0_CLIENT_ID=xxx
78 changes: 78 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Bug Report
description: File a bug report
labels: [ "bug", "triage" ]
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug 🐛!
Please search open/closed issues before submitting. Someone might have had the similar problem before 😉!
- type: textarea
id: description
attributes:
label: Description
description: A brief description of the issue.
placeholder: |
When I ____, I expected ____ to happen but ____ happened instead.
validations:
required: true

- type: input
id: link
attributes:
label: Link to the page
description: The link to the page where the issue occurs.
placeholder: https://eth.blockscout.com
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: |
Explain how to reproduce the issue in the development environment.
value: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
- type: input
id: version
attributes:
label: App version
description: The version of the front-end app you use. You can find it in the footer of the page.
placeholder: v1.2.0
validations:
required: true

- type: input
id: browser
# validations:
# required: true
attributes:
label: Browser
description: What browsers are you seeing the problem on? Please specify browser vendor and its version.
placeholder: Google Chrome 111

- type: dropdown
id: operating-system
# validations:
# required: true
attributes:
label: Operating system
description: The operating system this issue occurred with.
options:
- macOS
- Windows
- Linux

- type: textarea
id: additional-information
attributes:
label: Additional information
description: |
Use this section to provide any additional information you might have (e.g screenshots or screencasts).
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://blockscout.canny.io/feature-requests
about: Request a feature or enhancement
- name: Ask a question
url: https://github.com/orgs/blockscout/discussions
about: Ask questions and discuss topics with other community members
- name: Join our Discord Server
url: https://discord.gg/blockscout
about: The official Blockscout Discord community
133 changes: 133 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Checks
on:
workflow_call:
workflow_dispatch:
pull_request:
types: [ opened, synchronize, unlabeled ]
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.husky/**'
- '.vscode/**'
- 'deploy/**'
- 'docs/**'
- 'public/**'
- 'stub/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
code_quality:
name: Code quality
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'WIP') && !(github.event.action == 'unlabeled' && github.event.label.name != 'WIP') }}
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: Cache node_modules
uses: actions/cache@v3
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: Run ESLint
run: yarn lint:eslint

- name: Compile TypeScript
run: yarn lint:tsc

jest_tests:
name: Jest tests
needs: [ code_quality ]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: Cache node_modules
uses: actions/cache@v3
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: Run Jest
run: yarn test:jest

pw_tests:
name: 'Playwright tests / Project: ${{ matrix.project }}'
needs: [ code_quality ]
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.35.1-focal

strategy:
fail-fast: false
matrix:
project: [ default, mobile, dark-color-mode ]

steps:
- name: Install git-lfs
run: apt-get update && apt-get install git-lfs

- name: Checkout repo
uses: actions/checkout@v3
with:
lfs: 'true'

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: Cache node_modules
uses: actions/cache@v3
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: Run PlayWright
run: yarn test:pw:ci
env:
HOME: /root
PW_PROJECT: ${{ matrix.project }}

- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-report-${{ matrix.project }}
path: playwright-report
retention-days: 10
33 changes: 33 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Cleanup environments

on:
pull_request:
types:
- closed
- merged
workflow_dispatch:

jobs:
cleanup_release:
uses: blockscout/blockscout-ci-cd/.github/workflows/cleanup_helmfile.yaml@master
with:
appName: review-l2-$GITHUB_REF_NAME_SLUG
globalEnv: review
helmfileDir: deploy
kubeConfigSecret: ci/data/dev/kubeconfig/k8s-dev
vaultRole: ci-dev
secrets: inherit
cleanup_l2_release:
uses: blockscout/blockscout-ci-cd/.github/workflows/cleanup_helmfile.yaml@master
with:
appName: review-$GITHUB_REF_NAME_SLUG
globalEnv: review
helmfileDir: deploy
kubeConfigSecret: ci/data/dev/kubeconfig/k8s-dev
vaultRole: ci-dev
secrets: inherit
cleanup_docker_image:
uses: blockscout/blockscout-ci-cd/.github/workflows/cleanup_docker.yaml@master
with:
dockerImage: prerelease-$GITHUB_REF_NAME_SLUG
secrets: inherit
75 changes: 75 additions & 0 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Deploy from main branch

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish_image:
name: Publish Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# Will automatically make nice tags, see the table here https://github.com/docker/metadata-action#basic
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/blockscout/frontend

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_COMMIT_SHA=${{ env.SHORT_SHA }}
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 5a50b7f

Please sign in to comment.