-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alireza Akbarzadeh
authored and
Alireza Akbarzadeh
committed
Apr 24, 2024
1 parent
d034a8b
commit 5c4d3ae
Showing
6 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
v18.17.0 |
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,37 @@ | ||
name: Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- develop | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: echo "node_version=$(cat .github/nodejs.version)" >> $GITHUB_ENV | ||
- name: "use node ${{ env.node_version }}" | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "${{ env.node_version }}" | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: Lint check | ||
run: pnpm lint | ||
- name: Format check | ||
run: pnpm prettier | ||
- name: Unit & Integration tests | ||
run: pnpm test | ||
- name: Smoke & Acceptance tests | ||
run: | | ||
pnpm build-story --quiet | ||
pnpm playwright install | ||
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | ||
"npx http-server storybook-static --port 6006 --silent" \ | ||
"npx wait-on tcp:127.0.0.1:6006 && yarn test-storybook" |
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,18 @@ | ||
name: Code Review | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: anc95/ChatGPT-CodeReview@main | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
OPENAI_API_KEY: "${{ secrets.OPENAI_API_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,41 @@ | ||
name: Vitest Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- develop | ||
pull_request: null | ||
workflow_dispatch: null | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' # Set your Node.js version here | ||
registry-url: 'https://registry.npmjs.org/' | ||
cache: 'pnpm' | ||
always-auth: false | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run Vitest tests | ||
run: pnpm exec vitest | ||
|
||
- name: Upload Vitest Report | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: vitest-report | ||
path: vitest-report/ | ||
retention-days: 30 |