#6513 - Update Editor Component UI - Toolbar Text Indenting #21227
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
name: CI | |
env: | |
ROLLBAR_ENV: 'GitHubCI' | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
# These tests run slowly, so run them in a separate job. NOTE: if you change the name of this job, also change | |
# Its references in this file | |
e2e-tests-Parallel: | |
strategy: | |
matrix: | |
node: [ 18 ] | |
name: Commonwealth E2E Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: commonwealth | |
POSTGRES_DB: commonwealth | |
POSTGRES_PASSWORD: edgeware | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ matrix.node }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Build CI | |
run: yarn build-ci | |
- name: Cache browsers | |
id: playwright-cache | |
uses: actions/cache@v3 | |
with: | |
path: '~/.cache/ms-playwright/chromium-1045' | |
key: hashFiles('~/.cache/ms-playwright/chromium-1045') }} | |
- name: Install playwright browser drivers | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: npx playwright install chromium | |
- name: Install proxy | |
run: npm install -g local-ssl-proxy | |
- name: Add custom domain to /etc/hosts | |
run: sudo sh -c 'echo "127.0.0.1 customdomain.com" >> /etc/hosts' | |
- name: Run e2e tests (yarn test-e2e) | |
env: | |
PORT: 8080 | |
IS_CI: true | |
USES_DOCKER_PGSQL: true | |
ETH_ALCHEMY_API_KEY: ${{ secrets.ETH_ALCHEMY_API_KEY }} | |
ENTITIES_URL: ${{ secrets.ENTITIES_URL }} | |
run: | | |
sudo local-ssl-proxy --source 443 --target 8080 & | |
yarn --cwd packages/commonwealth e2e-start-server --forbid-only & | |
yarn --cwd packages/commonwealth wait-server && yarn --cwd packages/commonwealth test-e2e --forbid-only | |
- name: Archive test status | |
uses: actions/upload-artifact@v3 | |
with: | |
name: FlakySuiteStatus | |
path: packages/commonwealth/summary.json | |
- name: Upload e2e recordings on failure | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: Recordings | |
path: packages/commonwealth/test-results/ | |
# The tests that this job runs should not be flaky. If they are, move them back into the regular suite. | |
e2e-tests-Mature: | |
strategy: | |
matrix: | |
node: [ 18 ] | |
name: Commonwealth Mature E2E Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: commonwealth | |
POSTGRES_DB: commonwealth | |
POSTGRES_PASSWORD: edgeware | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ matrix.node }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Build CI | |
run: yarn build-ci | |
- name: Cache browsers | |
id: playwright-cache | |
uses: actions/cache@v3 | |
with: | |
path: '~/.cache/ms-playwright/chromium-1045' | |
key: hashFiles('~/.cache/ms-playwright/chromium-1045') }} | |
- name: Install playwright browser drivers | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: npx playwright install chromium | |
- name: Install proxy | |
run: npm install -g local-ssl-proxy | |
- name: Add custom domain to /etc/hosts | |
run: sudo sh -c 'echo "127.0.0.1 customdomain.com" >> /etc/hosts' | |
- name: Run e2e tests (yarn test-e2e) | |
env: | |
PORT: 8080 | |
IS_CI: true | |
USES_DOCKER_PGSQL: true | |
ETH_ALCHEMY_API_KEY: ${{ secrets.ETH_ALCHEMY_API_KEY }} | |
ENTITIES_URL: ${{ secrets.ENTITIES_URL }} | |
run: | | |
sudo local-ssl-proxy --source 443 --target 8080 & | |
yarn --cwd packages/commonwealth e2e-start-server --forbid-only & | |
yarn --cwd packages/commonwealth wait-server && yarn --cwd packages/commonwealth test-e2e-mature --forbid-only | |
- name: Archive test status | |
uses: actions/upload-artifact@v3 | |
with: | |
name: MatureSuiteStatus | |
path: packages/commonwealth/summary.json | |
- name: Upload e2e recordings on failure | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: Recordings | |
path: packages/commonwealth/test-results/ | |
e2e-tests-serial: | |
strategy: | |
matrix: | |
node: [ 18 ] | |
name: Commonwealth E2E Tests Serial | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: commonwealth | |
POSTGRES_DB: commonwealth | |
POSTGRES_PASSWORD: edgeware | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ matrix.node }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Build CI | |
run: yarn build-ci | |
- name: Cache browsers | |
id: playwright-cache | |
uses: actions/cache@v3 | |
with: | |
path: '~/.cache/ms-playwright/chromium-1045' | |
key: hashFiles('~/.cache/ms-playwright/chromium-1045') }} | |
- name: Install playwright browser drivers | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: npx playwright install chromium | |
- name: Run serial e2e tests (yarn test-e2e-serial) | |
run: yarn --cwd packages/commonwealth e2e-start-server & (yarn --cwd packages/commonwealth wait-server && yarn --cwd packages/commonwealth test-e2e-serial --forbid-only) | |
env: | |
PORT: 8080 | |
USES_DOCKER_PGSQL: true | |
ETH_ALCHEMY_API_KEY: ${{ secrets.ETH_ALCHEMY_API_KEY }} | |
ENTITIES_URL: ${{ secrets.ENTITIES_URL }} | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage-report | |
path: coverage | |
# Lint with recommendations | |
commonwealth-code-quality-recommendations: | |
strategy: | |
matrix: | |
node: [ 18 ] | |
name: Code Quality Recommendations | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Add node-gyp | |
run: yarn global add node-gyp | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ matrix.node }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn --ignore-engines | |
- name: Run linter | |
env: | |
GITHUB_BASE_REF: ${{ github.base_ref }} | |
run: yarn lint-branch-warnings | |
# Lint and Typecheck | |
commonwealth-code-quality: | |
strategy: | |
matrix: | |
node: [ 18 ] | |
name: Code Quality checks | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ matrix.node }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Add node-gyp | |
run: yarn global add node-gyp | |
- name: Install dependencies | |
run: yarn --ignore-engines | |
- name: Assert yarn.lock is correct | |
run: | | |
if ! git diff --quiet; then | |
echo 'You need to update the yarn.lock file' | |
exit 1 | |
fi | |
- name: Build | |
run: yarn build | |
- name: Run linter | |
env: | |
GITHUB_BASE_REF: ${{ github.base_ref }} | |
run: yarn lint-branch | |
- name: Commonwealth Typecheck | |
run: yarn --cwd packages/commonwealth check-types | |
- name: Discord-Bot Typecheck | |
run: yarn --cwd packages/discord-bot check-types | |
# These tests run quickly, so run them in a separate job | |
commonwealth-unit-integration: | |
strategy: | |
matrix: | |
node: [ 18 ] | |
name: Commonwealth Unit And Integration Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: commonwealth | |
POSTGRES_DB: commonwealth | |
POSTGRES_PASSWORD: edgeware | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ matrix.node }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Build CI | |
run: yarn build-ci | |
- name: Run unit tests | |
run: yarn --cwd packages/commonwealth unit-test --forbid-only | |
- name: Run API tests | |
run: yarn --cwd packages/commonwealth test-api --forbid-only | |
env: | |
NO_CLIENT: true | |
- name: Run util integration tests | |
run: yarn --cwd packages/commonwealth test-integration-util --forbid-only | |
env: | |
NO_CLIENT: true | |
COSMOS_GOV_V1: ${{ secrets.COSMOS_GOV_V1 }} | |
# These tests run slowly, so run them in a separate job | |
commonwealth-devnet-tests: | |
name: Devnet Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
matrix: | |
node: [ 18 ] | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: commonwealth | |
POSTGRES_DB: commonwealth | |
POSTGRES_PASSWORD: edgeware | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
evm_test_app: | |
image: irowan/common_chain_tests | |
ports: | |
- 3000:3000 | |
cosmos_test_app: | |
image: mhagel1/csdk-v1 | |
ports: | |
- 5051:5051 | |
cosmos_beta_test_app: | |
image: mhagel1/csdk-beta | |
ports: | |
- 5050:5050 | |
evmos_test_app: | |
image: mhagel1/evmos-dev | |
ports: | |
- 5052:5052 | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ matrix.node }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Build CI | |
run: yarn build-ci | |
## EVM Section: | |
- name: Start EVM Testnet | |
run: | | |
/usr/bin/docker pull trufflesuite/ganache; | |
network_name=$(docker inspect -f '{{.HostConfig.NetworkMode}}' ${{ job.services.evm_test_app.id }}) | |
echo "Network name: $network_name" | |
/usr/bin/docker run -d --name chain --network $network_name --network-alias chain -p 8545:8545 -e GITHUB_ACTIONS=true -e CI=true trufflesuite/ganache --fork --miner.blockTime 12 --wallet.unlockedAccounts 0xF977814e90dA44bFA03b6295A0616a897441aceC --wallet.unlockedAccounts 0xfA9b5f7fDc8AB34AAf3099889475d47febF830D7 --wallet.unlockedAccounts 0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8; | |
- name: Run EVM Devnet tests | |
run: yarn --cwd packages/commonwealth test-devnet evm --forbid-only | |
- name: Stop EVM Chain | |
run: docker stop chain | |
## Cosmos Section: | |
# We only run Cosmos devnet tests if any files in the following folders changes | |
- name: Get changed Cosmos devnet-related files | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: | | |
packages/commonwealth/test/devnet/cosmos/**/* | |
packages/commonwealth/server/cosmos-gov-notifications/**/* | |
packages/commonwealth/test/integration/cosmosGovNotifGenerator.spec.ts | |
packages/commonwealth/server/util/cosmosProxy.ts | |
packages/commonwealth/client/scripts/controllers/chain/cosmos/gov/**/* | |
packages/commonwealth/test/util/cosmos-chain-testing/**/* | |
libs/chains/src/cosmos-ts/**/* | |
- name: Run following steps if any file(s) in the Cosmos folders change | |
if: steps.changed-files-specific.outputs.all_changed_files | |
run: | | |
echo "One or more Cosmos Devnet-related files has changed." | |
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}" | |
- name: Run Cosmos Devnet tests | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: yarn --cwd packages/commonwealth start & (yarn --cwd packages/commonwealth wait-server && yarn --cwd packages/commonwealth test-devnet cosmos --forbid-only) | |
env: | |
PORT: 8080 | |
USES_DOCKER_PGSQL: true | |
COSMOS_GOV_V1: ${{ secrets.COSMOS_GOV_V1 }} |