-
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 4 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,128 @@ | ||
| name: Build, Check Formatting | ||
| on: | ||
| push: | ||
| branches: ['*'] | ||
| pull_request: | ||
| branches: ['*'] | ||
|
|
||
| jobs: | ||
| frontend: | ||
| name: Frontend Checks | ||
| 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: Check Formatting | ||
| working-directory: frontend | ||
| run: npm run format:check | ||
|
|
||
| - name: Formatting Check Passed | ||
| if: success() | ||
| run: echo "Prettier formatting check passed ✅" | ||
|
|
||
| - name: Lint Check | ||
| working-directory: frontend | ||
| run: npm run lint | ||
|
|
||
| - name: Lint Check Passed | ||
| if: success() | ||
| run: echo "Linting successful ✅" | ||
|
|
||
| - name: Run Frontend Tests | ||
| working-directory: frontend | ||
| run: npm test | ||
|
|
||
| - name: Frontend Tests Passed | ||
| if: success() | ||
| run: echo "Frontend tests passed ✅" | ||
|
|
||
| - name: Build | ||
| working-directory: frontend | ||
| run: npm run build | ||
|
|
||
| - name: Frontend Build Successful | ||
| if: success() | ||
| run: echo "Frontend build successful ✅" | ||
|
|
||
| - name: Run Frontend | ||
| working-directory: frontend | ||
| run: | | ||
| echo "Starting Frontend Server..." | ||
| npm run dev & | ||
|
|
||
| - name: ✅ Frontend Server Started | ||
| if: success() | ||
| run: echo "Frontend server started successfully ✅" | ||
|
|
||
| backend: | ||
| name: Backend Checks | ||
| 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: Check Formatting (if you have prettier/eslint) | ||
| working-directory: backend | ||
| run: | | ||
| if npm run format:check > /dev/null 2>&1; then | ||
| npm run format:check | ||
| else | ||
| echo "No format:check script found, skipping formatting check" | ||
| fi | ||
|
|
||
| - name: ✅ Formatting Check Passed | ||
| if: success() | ||
| run: echo "Backend formatting check passed ✅" | ||
|
|
||
| - name: Lint Check (if you have linting) | ||
| 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: Build Backend | ||
| working-directory: backend | ||
| run: npm run build | ||
|
|
||
| - name: ✅ Backend Build Successful | ||
| if: success() | ||
| run: echo "Backend build successful ✅" | ||
|
|
||
| - name: Run 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,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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, we don't have to emphasize to seperate frontend and backend, just focus on build/test for both of them.