Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clean up workflows and package.json #1076

Merged
merged 8 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Setup
description: Sets up a Node.js environment, installs the dependencies using Yarn,
and caches the installed dependencies for faster future builds.
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
cache: yarn

- uses: actions/cache@v3
id: install-cache
with:
path: node_modules/
key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }}

- if: steps.install-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --ignore-scripts --ignore-engines
shell: bash
13 changes: 3 additions & 10 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Workflow name
name: 'Chromatic Deployment'

on:
Expand All @@ -9,28 +8,22 @@ on:
# manual trigger
workflow_dispatch:

# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
# 👇 Version 2 of the action
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # 👈 Required to retrieve git history
# Required to retrieve git history
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: yarn
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
with:
token: ${{ secrets.GITHUB_TOKEN }}
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test

on:
push:
branches:
- master
pull_request:
# manual trigger
workflow_dispatch:

env:
REACT_APP_RELAY_CHAIN_NAME: polkadot
REACT_APP_PARACHAIN_ID: 2032
DOCKER_RELAY_CHAIN_CURRENCY: DOT
REACT_APP_FEATURE_FLAG_LENDING: enabled
REACT_APP_FEATURE_FLAG_AMM: enabled

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn lint

unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn test:ci
39 changes: 0 additions & 39 deletions .github/workflows/yarn-test.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module.exports = {
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/preset-create-react-app',
'storybook-addon-themes'
'storybook-addon-themes',
"@storybook/addon-actions"
],
webpackFinal: config => {
// MEMO: inspired by https://github.com/storybookjs/storybook/issues/3916
Expand Down
23 changes: 8 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
"@craco/craco": "^6.1.1",
"@headlessui/react": "^1.1.1",
"@heroicons/react": "^2.0.0",
"@hookform/resolvers": "^2.9.7",
"@interlay/bridge": "^0.2.3",
"@interlay/interbtc-api": "2.0.2",
"@material-icons/svg": "^1.0.28",
"@polkadot/api": "9.11.1",
"@interlay/interbtc-api": "2.0.3",
"@interlay/monetary-js": "0.7.2",
"@polkadot/api": "9.14.2",
"@polkadot/extension-dapp": "0.44.1",
"@polkadot/ui-keyring": "^2.9.7",
"@reach/tooltip": "^0.16.0",
Expand Down Expand Up @@ -41,9 +40,6 @@
"@react-stately/tooltip": "^3.2.3",
"@react-stately/tree": "^3.4.1",
"@tailwindcss/forms": "^0.3.2",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "^12.1.10",
"big.js": "^6.1.1",
"chart.js": "^2.9.4",
"clsx": "^1.1.1",
Expand Down Expand Up @@ -72,13 +68,10 @@
"react-transition-group": "^4.4.5",
"react-use": "^17.2.3",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"styled-components": "^5.3.5",
"typescript": "4.3.2",
"use-dark-mode": "^2.3.1",
"web-vitals": "^1.0.1",
"yup": "^0.32.11",
"zod": "^3.18.0"
"yup": "^0.32.11"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.16.7",
Expand All @@ -88,16 +81,18 @@
"@commitlint/cli": "^16.2.4",
"@commitlint/config-conventional": "^16.2.4",
"@open-wc/webpack-import-meta-loader": "^0.4.7",
"@polkadot/types": "9.11.1",
"@polkadot/types": "9.14.2",
"@react-types/grid": "^3.1.2",
"@react-types/shared": "^3.14.0",
"@storybook/addon-actions": "^6.5.9",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/addon-links": "^6.5.9",
"@storybook/node-logger": "^6.5.9",
"@storybook/preset-create-react-app": "^3.1.7",
"@storybook/react": "^6.5.9",
"@tailwindcss/postcss7-compat": "^2.0.3",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "^12.1.10",
"@types/big.js": "6.1.2",
"@types/history": "^4.7.1",
"@types/jest": "^26",
Expand All @@ -123,7 +118,6 @@
"prettier": "2.2.1",
"release-it": "^15.5.0",
"storybook-addon-themes": "^6.1.0",
"tailwind-config-viewer": "^1.5.1",
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
"tailwindcss-pseudo-elements": "^1.5.1",
"ts-node": "^8.6.2",
Expand All @@ -149,7 +143,6 @@
"setup": "yarn generate:defs && yarn generate:meta",
"build": "REACT_APP_VERSION=$npm_package_version craco build",
"build-with-webpack-bundle-analysis": "yarn build --stats && webpack-bundle-analyzer build/bundle-stats.json -m static -r build/bundle-stats.html -O",
"tailwind-config-viewer": "cd src && tailwind-config-viewer -o",
"lint-and-type-check": "yarn lint && yarn type-check",
"eject": "react-scripts eject",
"compose:regtest": "docker-compose --env-file .env.development.local up",
Expand Down
18 changes: 0 additions & 18 deletions src/containers/DarkModeToggle/index.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions src/lib/form-validation/amm/index.ts

This file was deleted.

44 changes: 0 additions & 44 deletions src/lib/form-validation/amm/pool.ts

This file was deleted.

43 changes: 0 additions & 43 deletions src/lib/form-validation/common/balance.ts

This file was deleted.

Loading