-
Notifications
You must be signed in to change notification settings - Fork 57
Feature: Automated Testing & CI/CD Pipeline #53
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
Open
Shravanthi20
wants to merge
16
commits into
hitesh-kumar123:main
Choose a base branch
from
Shravanthi20:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ffb9fbe
Installed jest
Shravanthi20 789576e
Merge branch 'main' of https://github.com/hitesh-kumar123/Smart-Rent-β¦
Shravanthi20 474e638
Added testing framework and CI/CD pipeline
Shravanthi20 8c0fb39
Trigger GitHub Actions
Shravanthi20 894f0bb
Added yml file
Shravanthi20 8154750
Fix: Track package-lock.json for CI
Shravanthi20 ef4ed17
Added package-lock.json
Shravanthi20 afaf0fb
Merge branch 'main' into main
Shravanthi20 f8c5691
Fix blocking issues: MongoDB fallback, remove test endpoint, package.β¦
Shravanthi20 4205499
Fix tests: Update property test to use available /api/properties endpβ¦
Shravanthi20 521ce2a
Fixed issues
Shravanthi20 572cd27
Merge branch 'main' into main
Shravanthi20 624c6e2
Merge branch 'main' into main
Shravanthi20 768a1d8
Fixed mongodb uri
Shravanthi20 8e14cb7
Merge branch 'main' into main
Shravanthi20 ee39d9c
Merge branch 'main' into main
Shravanthi20 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,49 @@ | ||
| name: Node.js CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| services: | ||
| mongodb: | ||
| image: mongo:latest | ||
| ports: | ||
| - 27017:27017 | ||
| options: >- | ||
| --health-cmd mongosh | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 20.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'npm' | ||
| cache-dependency-path: backend/package-lock.json | ||
|
|
||
| - name: Install Dependencies | ||
| working-directory: ./backend | ||
| run: npm ci | ||
|
|
||
| - name: Run Tests | ||
| working-directory: ./backend | ||
| env: | ||
| MONGO_URL: mongodb://localhost:27017/test_db | ||
| PORT: 8000 | ||
| NODE_ENV: test | ||
| run: npm test |
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 |
|---|---|---|
|
|
@@ -102,7 +102,7 @@ firebase-debug.log | |
| serviceAccount.json | ||
|
|
||
| # Package files | ||
| package-lock.json | ||
|
|
||
| yarn.lock | ||
| .tmp | ||
| .temp | ||
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
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.