Skip to content

Commit

Permalink
v7.3.4
Browse files Browse the repository at this point in the history
v7.3.4
  • Loading branch information
platschi authored Jul 4, 2023
2 parents ae77e7c + 511cc72 commit 0884b17
Show file tree
Hide file tree
Showing 54 changed files with 1,377 additions and 596 deletions.
21 changes: 21 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
coverage:
precision: 2
round: down
range: '50...85' # Will lift this number as coverage increases

status:
project:
default:
# basic
target: auto
threshold: 1%
base: auto
patch:
default:
# basic
target: 80%
threshold: 1%
base: auto

ignore:
- 'packages/sdk/.*' # Waiting for sdk tests
42 changes: 42 additions & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Jest'
on:
push:
branches:
- master
pull_request:

jobs:
sentry_release:
name: Jest tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16.x

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Install dependencies
run: pnpm i

- name: Run tests
run: cd packages/app && pnpm run test:jest
env:
NEXT_PUBLIC_WALLETCONNECT_V2_ID: ${{ secrets.NEXT_PUBLIC_WALLETCONNECT_V2_ID }}

- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:

- name: Build code
run: pnpm i && cd packages/app && pnpm build
env:
NEXT_PUBLIC_WALLETCONNECT_V2_ID: ${{ secrets.NEXT_PUBLIC_WALLETCONNECT_V2_ID }}

- name: Create Sentry release
uses: getsentry/action-release@v1
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kwenta",
"version": "7.3.3",
"version": "7.3.4",
"description": "Kwenta",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -32,9 +32,9 @@
]
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "5.60.1",
"@typescript-eslint/parser": "5.60.1",
"eslint": "8.43.0",
"@typescript-eslint/eslint-plugin": "5.61.0",
"@typescript-eslint/parser": "5.61.0",
"eslint": "8.44.0",
"eslint-config-prettier": "8.8.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-cypress": "2.13.3",
Expand Down
57 changes: 0 additions & 57 deletions packages/app/__tests__/pages/market.test.tsx

This file was deleted.

27 changes: 16 additions & 11 deletions packages/app/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
const nextJest = require('next/jest');
const nextJest = require('next/jest')

const createJestConfig = nextJest({ dir: './' });
const createJestConfig = nextJest({ dir: './' })

const customJestConfig = {
roots: ['<rootDir>'],
modulePaths: ['<rootDir>'],
moduleDirectories: ['node_modules'],
roots: ['<rootDir>', 'src'],
modulePaths: ['<rootDir>', 'src'],
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
'@kwenta/sdk/(.+)$': '<rootDir>/../sdk/dist/$1',
'@kwenta/sdk': '<rootDir>/../sdk/dist/index.js',
},
globalSetup: './testing/unit/setup/global.js',
setupFilesAfterEnv: ['./testing/unit/setup/setup.js'],
testEnvironment: 'jest-environment-jsdom',
transform: {
'^.+\\.(svg)$': `jest-transformer-svg`,
},
};
}

const getCustomConfig = async () => {
// Delete next js module name mapper transform and use above svg
// transformer to avoid errors with svg and styled components
const config = await createJestConfig(customJestConfig)();
delete config['moduleNameMapper']['^.+\\.(svg)$'];
return config;
};
const config = await createJestConfig(customJestConfig)()
delete config['moduleNameMapper']['^.+\\.(svg)$']
config.transformIgnorePatterns = []
return config
}

module.exports = getCustomConfig();
module.exports = getCustomConfig()
9 changes: 4 additions & 5 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@kwenta/app",
"version": "7.3.3",
"version": "7.3.4",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"export": "next export",
"check-types": "tsc --noEmit",
"jest-preview": "jest-preview",
"test:unit": "jest --coverage --detectOpenHandles",
"test:jest": "jest --coverage --detectOpenHandles",
"test:e2e": "start-server-and-test 'pnpm build && pnpm start' http-get://localhost:3000 'synpress run'",
"test:e2e:only:tests": "synpress run",
"test:e2e:open:testrunner": "synpress open",
Expand Down Expand Up @@ -43,7 +43,7 @@
"cors": "^2.8.5",
"crypto-browserify": "^3.12.0",
"date-fns": "2.21.3",
"date-fns-tz": "1.3.7",
"date-fns-tz": "2.0.0",
"echarts": "5.4.2",
"eslint-config-next": "^13.4.6",
"ethcall": "4.7.2",
Expand Down Expand Up @@ -82,10 +82,9 @@
"zrender": "^5.4.3"
},
"devDependencies": {
"@microsoft/eslint-formatter-sarif": "2.1.7",
"@next/eslint-plugin-next": "13.4.7",
"@storybook/addon-actions": "7.0.24",
"@storybook/addon-essentials": "7.0.24",
"@storybook/addon-essentials": "7.0.25",
"@storybook/addon-links": "7.0.24",
"@storybook/nextjs": "7.0.24",
"@storybook/react": "7.0.24",
Expand Down
Loading

1 comment on commit 0884b17

@vercel
Copy link

@vercel vercel bot commented on 0884b17 Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kwenta – ./packages/app

kwenta-kwenta.vercel.app
kwenta-git-main-kwenta.vercel.app
kwenta.io

Please sign in to comment.