Skip to content

Commit

Permalink
chore: setup github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alireza Akbarzadeh authored and Alireza Akbarzadeh committed Apr 24, 2024
1 parent d034a8b commit 5c4d3ae
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 0 deletions.
Binary file added .github/assets/project-logo-vertical copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/project-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/nodejs.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.17.0
37 changes: 37 additions & 0 deletions .github/workflows/check.yml
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"
18 changes: 18 additions & 0 deletions .github/workflows/cr.yml
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 }}"
41 changes: 41 additions & 0 deletions .github/workflows/vitest.yml
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

0 comments on commit 5c4d3ae

Please sign in to comment.