Skip to content
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

monorepo ci workflow added #213

Merged
merged 5 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Build CI
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
DJANGO_SETTINGS_MODULE: djangoindia.settings.production
SECRET_KEY: test-key-not-for-production
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Django dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/production.txt

- name: Run Django migrations
run: python manage.py migrate

- name: Run Django system checks
run: python manage.py check

# - name: Run Django tests
# run: python manage.py test
# # Commented out as there are no tests currently

frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
env:
API_URL: http://localhost:8000/api/v1
NEXT_PUBLIC_API_URL: http://localhost:8000/api/v1
NEXT_PUBLIC_FRONTEND_URL: http://localhost:3000
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run Next.js build
run: npm run build
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![Djangoindia.org Build](https://github.com/djangoindia/djangoindia.org/actions/workflows/build.yml/badge.svg?branch=main)

<div align="center">
<img src="assets/djangoindia-logo.png" alt="Django India Logo" />
</div>
Expand Down Expand Up @@ -36,7 +38,7 @@ Join our community. Here's how you can get involved:
- **Report Issues:** Notice something not quite right? Let us know by creating an issue. Your feedback is invaluable! 🐛
- **Contribute Code:** Dive into open issues and send pull requests to help us squash bugs and implement exciting enhancements. 🛠️
- **Review Pull requests:** By actively reviewing pull requests, you can help maintain the quality and integrity of the project, while also supporting other contributors and fostering a collaborative environment within the Django India community.🕵️

Together, let's build something incredible! ✨🚀


Expand All @@ -53,7 +55,7 @@ For more details, please see our [Contributing.md](https://github.com/djangoindi
<tr>
<td align="center" width="150px">
<a href="https://github.com/ankanchanda">
<img src="https://avatars.githubusercontent.com/u/108596468?v=4" width="75" height="75"  
<img src="https://avatars.githubusercontent.com/u/108596468?v=4" width="75" height="75"  
alt="Saurabh Sharma" />
<br />
Ankan Chanda
Expand All @@ -70,7 +72,7 @@ For more details, please see our [Contributing.md](https://github.com/djangoindi
</td>
<td align="center" width="150px">
<a href="https://github.com/nikhil25803">
<img src="https://avatars.githubusercontent.com/u/93156825?v=4" width="75" height="75"  
<img src="https://avatars.githubusercontent.com/u/93156825?v=4" width="75" height="75"  
alt="Nikhil Raj" />
<br />
Nikhil Raj
Expand All @@ -87,7 +89,7 @@ For more details, please see our [Contributing.md](https://github.com/djangoindi
</td>
<td align="center" width="150px">
<a href="https://github.com/Knighthawk-Leo">
<img src="https://avatars.githubusercontent.com/u/72437494?v=4" width="75" height="75"  
<img src="https://avatars.githubusercontent.com/u/72437494?v=4" width="75" height="75"  
alt="Sanskar Dwivedi" />
<br />
Sanskar Dwivedi
Expand All @@ -104,7 +106,7 @@ For more details, please see our [Contributing.md](https://github.com/djangoindi
</td>
<td align="center" width="150px">
<a href="https://github.com/Saurabhsharma884">
<img src="https://avatars.githubusercontent.com/u/65456653?v=4" width="75" height="75"  
<img src="https://avatars.githubusercontent.com/u/65456653?v=4" width="75" height="75"  
alt="Saurabh Sharma" />
<br />
Saurabh Sharma
Expand All @@ -126,4 +128,4 @@ For more details, please see our [Contributing.md](https://github.com/djangoindi
## License

This project is licensed under the MIT License, one of the most permissive and widely used open-source licenses.This means that you can integrate this project into your applications, modify it to fit your needs, and even distribute it as part of a commercial product without any concern for legal restrictions.
For more details, please see our [License.](https://github.com/djangoindia/djangoindia.org/blob/main/LICENSE)
For more details, please see our [License.](https://github.com/djangoindia/djangoindia.org/blob/main/LICENSE)
Loading