-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v7.3.4
- Loading branch information
Showing
54 changed files
with
1,377 additions
and
596 deletions.
There are no files selected for viewing
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
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 |
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
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 }} |
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
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
This file was deleted.
Oops, something went wrong.
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
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() |
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
Oops, something went wrong.
0884b17
There was a problem hiding this comment.
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