-
Notifications
You must be signed in to change notification settings - Fork 52
CI Github action work flow #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ebba112
Add CI workflow
jayesh9747 82119dd
add formatter commnad & run formatter command
jayesh9747 1762a1b
add formatter command in the fronted repository
jayesh9747 d6cf4d6
make ci.yml file more readable
jayesh9747 6da5482
break workflow into test & build
jayesh9747 bb6ca86
docker build workflow added
Alivestars24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,80 @@ | ||
| name: Build and Deploy | ||
|
|
||
| on: | ||
| push: | ||
| branches: '*' | ||
|
|
||
| jobs: | ||
| frontend-build: | ||
| name: Frontend Build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
|
|
||
| - name: Install Dependencies | ||
| working-directory: frontend | ||
| run: npm ci | ||
|
|
||
| - name: Build Frontend | ||
| working-directory: frontend | ||
| run: npm run build | ||
|
|
||
| - name: ✅ Frontend Build Successful | ||
| if: success() | ||
| run: echo "Frontend build successful ✅" | ||
|
|
||
| - name: Start Frontend Server | ||
| working-directory: frontend | ||
| run: | | ||
| echo "Starting Frontend Server..." | ||
| npm run dev & | ||
| sleep 5 | ||
| echo "Frontend server started" | ||
|
|
||
| - name: ✅ Frontend Server Started | ||
| if: success() | ||
| run: echo "Frontend server started successfully ✅" | ||
|
|
||
| backend-build: | ||
| name: Backend Build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
|
|
||
| - name: Install Dependencies | ||
| working-directory: backend | ||
| run: npm ci | ||
|
|
||
| - name: ✅ Dependencies Installed | ||
| if: success() | ||
| run: echo "Backend dependencies installed successfully ✅" | ||
|
|
||
| - name: Build Backend | ||
| working-directory: backend | ||
| run: npm run build | ||
|
|
||
| - name: ✅ Backend Build Successful | ||
| if: success() | ||
| run: echo "Backend build successful ✅" | ||
|
|
||
| - name: Start Backend Server | ||
| working-directory: backend | ||
| run: | | ||
| echo "Starting Backend Server..." | ||
| npm run dev & | ||
| sleep 5 | ||
| echo "Backend server started" | ||
|
|
||
| - name: ✅ Backend Server Started | ||
| if: success() | ||
| run: echo "Backend server started successfully ✅" | ||
This file contains hidden or 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,84 @@ | ||
| name: Run Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: ['*'] | ||
| pull_request: | ||
| branches: ['*'] | ||
|
|
||
| jobs: | ||
| frontend-tests: | ||
| name: Frontend Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
|
|
||
| - name: Install Dependencies | ||
| working-directory: frontend | ||
| run: npm ci | ||
|
|
||
| - name: Lint Check | ||
| working-directory: frontend | ||
| run: npm run lint | ||
|
|
||
| - name: ✅ Lint Check Passed | ||
| if: success() | ||
| run: echo "Frontend linting successful ✅" | ||
|
|
||
| - name: Run Frontend Tests | ||
| working-directory: frontend | ||
| run: npm test | ||
|
|
||
| - name: ✅ Frontend Tests Passed | ||
| if: success() | ||
| run: echo "Frontend tests passed ✅" | ||
|
|
||
| backend-tests: | ||
| name: Backend Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
|
|
||
| - name: Install Dependencies | ||
| working-directory: backend | ||
| run: npm ci | ||
|
|
||
| - name: ✅ Dependencies Installed | ||
| if: success() | ||
| run: echo "Backend dependencies installed successfully ✅" | ||
|
|
||
| - name: Lint Check | ||
| working-directory: backend | ||
| run: | | ||
| if npm run lint > /dev/null 2>&1; then | ||
| npm run lint | ||
| else | ||
| echo "No lint script found, skipping lint check" | ||
| fi | ||
|
|
||
| - name: ✅ Lint Check Passed | ||
| if: success() | ||
| run: echo "Backend linting successful ✅" | ||
|
|
||
| - name: Run Backend Tests | ||
| working-directory: backend | ||
| run: | | ||
| if npm run test > /dev/null 2>&1; then | ||
| npm test | ||
| else | ||
| echo "No test script found, skipping tests" | ||
| fi | ||
|
|
||
| - name: ✅ Backend Tests Passed | ||
| if: success() | ||
| run: echo "Backend tests passed ✅" |
This file contains hidden or 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,25 @@ | ||
| # Dependencies | ||
| node_modules | ||
|
|
||
| # Build output | ||
| dist | ||
| build | ||
|
|
||
| # Logs | ||
| *.log | ||
| npm-debug.log* | ||
|
|
||
| # Coverage | ||
| coverage | ||
|
|
||
| # Package files | ||
| package-lock.json | ||
| yarn.lock | ||
|
|
||
| # IDE | ||
| .vscode | ||
| .idea | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.