-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from DLC-link/feat/github-actions
feat: added github actions
- Loading branch information
Showing
7 changed files
with
276 additions
and
4 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,24 @@ | ||
name: Provision | ||
description: Set up job with tasks needed to run a code check | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set up node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }} | ||
|
||
- uses: nick-fields/retry@v2 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
env: | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 3 | ||
command: yarn --frozen-lockfile |
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,72 @@ | ||
name: Code Checks | ||
|
||
on: | ||
merge_group: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
lint-eslint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/provision | ||
|
||
- name: Lint | ||
run: yarn lint:eslint | ||
|
||
lint-filename: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/provision | ||
|
||
- name: File name checker | ||
run: yarn lint:filename | ||
|
||
lint-prettier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/provision | ||
|
||
- name: Lint | ||
run: yarn lint:prettier | ||
|
||
lint-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Lint commit message | ||
uses: wagoid/commitlint-github-action@v4 | ||
|
||
lint-unused-exports: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/provision | ||
|
||
- name: Lint unused TypeScript exports | ||
run: yarn lint:unused-exports | ||
|
||
typecheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/provision | ||
|
||
- name: Typecheck | ||
run: yarn typecheck | ||
|
||
test-unit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/provision | ||
|
||
- name: Test | ||
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
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,175 @@ | ||
diff --git a/.eslintignore b/.eslintignore | ||
index c855ba8..41a61a1 100644 | ||
--- a/.eslintignore | ||
+++ b/.eslintignore | ||
@@ -4,4 +4,5 @@ dist/ | ||
.eslintrc.js | ||
tsconfig.json | ||
vite.config.ts | ||
+vitest.config.ts | ||
env.d.ts | ||
diff --git a/.github/actions/provision/action.yml b/.github/actions/provision/action.yml | ||
new file mode 100644 | ||
index 0000000..1af8bb3 | ||
--- /dev/null | ||
+++ b/.github/actions/provision/action.yml | ||
@@ -0,0 +1,24 @@ | ||
+name: Provision | ||
+description: Set up job with tasks needed to run a code check | ||
+runs: | ||
+ using: 'composite' | ||
+ steps: | ||
+ - name: Set up node | ||
+ uses: actions/setup-node@v3 | ||
+ with: | ||
+ node-version: 18 | ||
+ | ||
+ - uses: actions/cache@v3 | ||
+ id: cache | ||
+ with: | ||
+ path: '**/node_modules' | ||
+ key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }} | ||
+ | ||
+ - uses: nick-fields/retry@v2 | ||
+ if: steps.cache.outputs.cache-hit != 'true' | ||
+ env: | ||
+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
+ with: | ||
+ timeout_minutes: 5 | ||
+ max_attempts: 3 | ||
+ command: yarn --frozen-lockfile | ||
diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml | ||
new file mode 100644 | ||
index 0000000..078c399 | ||
--- /dev/null | ||
+++ b/.github/workflows/code-checks.yml | ||
@@ -0,0 +1,72 @@ | ||
+name: Code Checks | ||
+ | ||
+on: | ||
+ merge_group: | ||
+ push: | ||
+ branches: | ||
+ - '**' | ||
+ | ||
+jobs: | ||
+ lint-eslint: | ||
+ runs-on: ubuntu-latest | ||
+ steps: | ||
+ - uses: actions/checkout@v4 | ||
+ - uses: ./.github/actions/provision | ||
+ | ||
+ - name: Lint | ||
+ run: yarn lint:eslint | ||
+ | ||
+ lint-filename: | ||
+ runs-on: ubuntu-latest | ||
+ steps: | ||
+ - uses: actions/checkout@v4 | ||
+ - uses: ./.github/actions/provision | ||
+ | ||
+ - name: File name checker | ||
+ run: yarn lint:filename | ||
+ | ||
+ lint-prettier: | ||
+ runs-on: ubuntu-latest | ||
+ steps: | ||
+ - uses: actions/checkout@v4 | ||
+ - uses: ./.github/actions/provision | ||
+ | ||
+ - name: Lint | ||
+ run: yarn lint:prettier | ||
+ | ||
+ lint-commit: | ||
+ runs-on: ubuntu-latest | ||
+ steps: | ||
+ - uses: actions/checkout@v4 | ||
+ with: | ||
+ fetch-depth: 0 | ||
+ | ||
+ - name: Lint commit message | ||
+ uses: wagoid/commitlint-github-action@v4 | ||
+ | ||
+ lint-unused-exports: | ||
+ runs-on: ubuntu-latest | ||
+ steps: | ||
+ - uses: actions/checkout@v4 | ||
+ - uses: ./.github/actions/provision | ||
+ | ||
+ - name: Lint unused TypeScript exports | ||
+ run: yarn lint:unused-exports | ||
+ | ||
+ typecheck: | ||
+ runs-on: ubuntu-latest | ||
+ steps: | ||
+ - uses: actions/checkout@v4 | ||
+ - uses: ./.github/actions/provision | ||
+ | ||
+ - name: Typecheck | ||
+ run: yarn typecheck | ||
+ | ||
+ test-unit: | ||
+ runs-on: ubuntu-latest | ||
+ steps: | ||
+ - uses: actions/checkout@v4 | ||
+ - uses: ./.github/actions/provision | ||
+ | ||
+ - name: Test | ||
+ run: yarn test:unit | ||
diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml | ||
index 90b6b70..5c9dc28 100644 | ||
--- a/.github/workflows/playwright.yml | ||
+++ b/.github/workflows/playwright.yml | ||
@@ -1,9 +1,9 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
- branches: [ main, master ] | ||
+ branches: [ dev ] | ||
pull_request: | ||
- branches: [ main, master ] | ||
+ branches: [ dev ] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
diff --git a/.prettierignore b/.prettierignore | ||
index c855ba8..41a61a1 100644 | ||
--- a/.prettierignore | ||
+++ b/.prettierignore | ||
@@ -4,4 +4,5 @@ dist/ | ||
.eslintrc.js | ||
tsconfig.json | ||
vite.config.ts | ||
+vitest.config.ts | ||
env.d.ts | ||
diff --git a/package.json b/package.json | ||
index 1907c43..1a745c9 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -12,7 +12,8 @@ | ||
"lint:prettier": "prettier --check \"{src,tests}/**/*.{ts,tsx}\" \"*.{js,json}\"", | ||
"lint:prettier:fix": "prettier --write \"{src,tests}/**/*.{ts,tsx}\" *.js", | ||
"lint:unused-exports": "ts-unused-exports tsconfig.json --ignoreFiles=tests", | ||
- "test:unit": "vitest", | ||
+ "typecheck": "tsc --noEmit", | ||
+ "test:unit": "vitest unit", | ||
"test:integration": "npx playwright test", | ||
"preview": "vite preview" | ||
}, | ||
diff --git a/src/app/components/modals/components/modal-container.tsx b/src/app/components/modals/components/modal-container.tsx | ||
index 2eb5057..7b1af7f 100644 | ||
--- a/src/app/components/modals/components/modal-container.tsx | ||
+++ b/src/app/components/modals/components/modal-container.tsx | ||
@@ -23,7 +23,7 @@ export function ModalContainer(): React.JSX.Element { | ||
|
||
return ( | ||
<> | ||
- <SelectWalletModal | ||
+ <SelectWalletModal | ||
isOpen={isSelectWalletModalOpen} | ||
handleClose={() => | ||
handleClosingModal(modalActions.toggleSelectWalletModalVisibility) | ||
diff --git a/tests/unit/utilities.test.ts b/tests/unit/utilities.unit.test.ts | ||
similarity index 100% | ||
rename from tests/unit/utilities.test.ts | ||
rename to tests/unit/utilities.unit.test.ts |
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
File renamed without changes.