-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from stabilitydao/4-vault
Tests(e2e+unit), workflow update with eslint, 1inch & vs hodl apr fix etc.
- Loading branch information
Showing
81 changed files
with
5,739 additions
and
4,355 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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
PUBLIC_GRAPH_API_KEY=GRAPH_API_KEY | ||
PUBLIC_GOOGLE_ANALYTICS_KEY=GOOGLE_ANALYTICS_KEY | ||
PUBLIC_GRAPH_API_KEY= | ||
PUBLIC_GOOGLE_ANALYTICS_KEY= | ||
|
||
PUBLIC_SEED_PHRASE= | ||
PUBLIC_METAMSK_PASSWORD= | ||
PUBLIC_PRIVATE_KEY= |
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,24 @@ | ||
name: ESLint Check | ||
|
||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
jobs: | ||
lint: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: | | ||
yarn add eslint eslint-plugin-astro @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-prettier astro-eslint-parser --dev | ||
- name: Run ESLint | ||
run: | | ||
export NODE_OPTIONS=--max-old-space-size=8192 | ||
yarn lint |
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,20 @@ | ||
name: Unit Tests(Vitest) | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Run vitest | ||
run: yarn test:unit |
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,28 @@ | ||
name: End-to-End Tests(Playwright) | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Install Playwright Browsers | ||
run: yarn playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: yarn test:e2e | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
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,20 @@ | ||
name: Codecov | ||
|
||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
jobs: | ||
codecov: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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 |
---|---|---|
|
@@ -23,3 +23,6 @@ pnpm-debug.log* | |
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ | ||
|
||
# synpress cache | ||
.cache-synpress |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import typescriptParser from "@typescript-eslint/parser"; | ||
import typescriptPlugin from "@typescript-eslint/eslint-plugin"; | ||
import prettierPlugin from "eslint-plugin-prettier"; | ||
import eslintPluginAstro from "eslint-plugin-astro"; | ||
import astroParser from "astro-eslint-parser"; | ||
import reactPlugin from "eslint-plugin-react"; | ||
|
||
export default [ | ||
{ | ||
ignores: [ | ||
"node_modules/**", | ||
"dist/**", | ||
"playwright-report/**", | ||
"public/**", | ||
"test-results/**", | ||
"tests/**", | ||
".cache-synpress/**", | ||
], | ||
}, | ||
// { | ||
// files: ["**/*.astro"], | ||
// languageOptions: { | ||
// parser: astroParser, | ||
// parserOptions: { | ||
// extraFileExtensions: [".astro"], | ||
// project: "./tsconfig.json", | ||
// }, | ||
// }, | ||
// plugins: { | ||
// astro: eslintPluginAstro, | ||
// prettier: prettierPlugin, | ||
// }, | ||
// rules: { | ||
// ...eslintPluginAstro.configs.recommended.rules, | ||
// "prettier/prettier": "error", | ||
// }, | ||
// }, | ||
{ | ||
files: ["**/*.ts", "**/*.tsx"], | ||
languageOptions: { | ||
parser: typescriptParser, | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
project: "./tsconfig.json", | ||
}, | ||
}, | ||
plugins: { | ||
"@typescript-eslint": typescriptPlugin, | ||
react: reactPlugin, | ||
}, | ||
rules: { | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ argsIgnorePattern: "^_" }, | ||
], | ||
"@typescript-eslint/explicit-module-boundary-types": "warn", | ||
"@typescript-eslint/no-explicit-any": "warn", | ||
// "@typescript-eslint/ban-ts-comment": "warn", | ||
"react/no-unescaped-entities": "off", | ||
"react/jsx-no-undef": "error", | ||
"react/jsx-fragments": ["error", "syntax"], | ||
|
||
// "@typescript-eslint/consistent-type-imports": "error", | ||
// "@typescript-eslint/naming-convention": [ | ||
// "error", | ||
// { | ||
// selector: "variable", | ||
// format: ["camelCase", "UPPER_CASE"], | ||
// }, | ||
// { | ||
// selector: "typeLike", | ||
// format: ["PascalCase"], | ||
// }, | ||
// ], | ||
}, | ||
}, | ||
]; |
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
Oops, something went wrong.