-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create build pipeline and update README.md (#4)
Co-authored-by: Lance Tan <[email protected]>
- Loading branch information
1 parent
39099a4
commit dec08f8
Showing
25 changed files
with
507 additions
and
146 deletions.
There are no files selected for viewing
This file contains 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,54 @@ | ||
name: Build Pipeline for Python and Django | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./backend | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install pipenv | ||
run: | | ||
python -m pip install --upgrade pipenv wheel | ||
- id: cache-pipenv | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.local/share/virtualenvs | ||
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-pipenv.outputs.cache-hit != 'true' | ||
run: | | ||
pipenv install --deploy --dev | ||
- name: Run linting | ||
run: | | ||
pipenv run flake8 | ||
- name: Makes sure it runs | ||
env: | ||
SECRET_KEY: ${{ secrets.DJANGO_SECRET }} | ||
run: | | ||
pipenv run python manage.py check | ||
- name: Run tests | ||
env: | ||
SECRET_KEY: ${{ secrets.DJANGO_SECRET }} | ||
run: | | ||
pipenv run python manage.py test |
This file contains 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 |
---|---|---|
@@ -1 +1,86 @@ | ||
# microvan | ||
# Microvan Inc. | ||
<!-- PROJECT LOGO --> | ||
<br /> | ||
<p align="center"> | ||
<a href="https://github.com/ubclaunchpad/microvan"> | ||
<img src="frontend/public/LogoIcon.png" alt="Logo" height="100" resize> | ||
</a> | ||
<h3 align="center">Microvan Inc.</h3> | ||
</p> | ||
|
||
|
||
<!-- TABLE OF CONTENTS --> | ||
<h2 style="display: inline-block">Table of Contents</h2> | ||
<ol> | ||
<li> | ||
<a href="#about-the-project">About The Project</a> | ||
<ul> | ||
<li><a href="#built-with">Built With</a></li> | ||
</ul> | ||
</li> | ||
<li> | ||
<a href="#getting-started">Getting Started</a> | ||
<ul> | ||
<li><a href="#prerequisites">Prerequisites</a></li> | ||
<li><a href="#installation">Installation</a></li> | ||
</ul> | ||
</li> | ||
<li><a href="#deployment">Deployment</a></li> | ||
<li><a href="#contributing">Contributing</a></li> | ||
</ol> | ||
|
||
|
||
|
||
<!-- ABOUT THE PROJECT --> | ||
## About The Project | ||
|
||
Microvan Inc. focuses on the importation, trade and sale of second-hand construction and industrial machinery, trucks and vehicles in the Philippines. Previously, Microvan Inc. would do in-person auctions every two months. However, due to the pandemic, many of their competitors have shifted to online auctions and Microvan Inc. needs a new auction site to ensure they aren't left behind. | ||
|
||
|
||
### Built With | ||
|
||
* Next JS - Frontend | ||
* Django JS - Backend | ||
* PostgreSQL - Database | ||
* AWS - Hosting | ||
|
||
|
||
<!-- GETTING STARTED --> | ||
## Getting Started | ||
|
||
To get a local copy up and running follow these simple steps. | ||
|
||
### Prerequisites | ||
|
||
* [NodeJS/npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) | ||
* [Python/pip](https://packaging.python.org/en/latest/tutorials/installing-packages/) | ||
* [pipenv](https://pipenv.pypa.io/en/latest/installation/) | ||
|
||
### Installation | ||
#### Django Backend | ||
|
||
1. `cd` into backend folder | ||
2. run `pipenv install` to install dependencies | ||
3. run `pipenv shell` to enter virtual environment | ||
4. run `pipenv run start` | ||
|
||
#### NextJS Frontend | ||
|
||
1. `cd` into frontend folder | ||
2. run `npm install` to install dependencies | ||
3. run `npm start` | ||
|
||
<!-- DEPLOYMENT --> | ||
## Deployment | ||
|
||
TODO | ||
|
||
<!-- CONTRIBUTING --> | ||
## Contributing | ||
|
||
Contributions are what make the community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. | ||
|
||
1. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) | ||
2. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) | ||
3. Push to the Branch (`git push origin feature/AmazingFeature`) | ||
4. Open a Pull Request |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,29 +1,39 @@ | ||
# Generated by Django 4.2.5 on 2023-10-07 23:50 | ||
|
||
from django.db import migrations, models | ||
import uuid | ||
|
||
from django.db import migrations, models | ||
|
||
class Migration(migrations.Migration): | ||
|
||
class Migration(migrations.Migration): | ||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
dependencies = [] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Auction', | ||
name="Auction", | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('identifier', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), | ||
('created_at', models.DateTimeField(editable=False)), | ||
('updated_at', models.DateTimeField()), | ||
('end_date', models.DateTimeField(editable=False)), | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"identifier", | ||
models.UUIDField(default=uuid.uuid4, editable=False, unique=True), | ||
), | ||
("created_at", models.DateTimeField(editable=False)), | ||
("updated_at", models.DateTimeField()), | ||
("end_date", models.DateTimeField(editable=False)), | ||
], | ||
options={ | ||
'ordering': ['-created_at'], | ||
'abstract': False, | ||
"ordering": ["-created_at"], | ||
"abstract": False, | ||
}, | ||
), | ||
] |
This file contains 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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
from django.db import models | ||
|
||
from core.models import MainModel | ||
from user.models import User | ||
from vehicle.models import Vehicle | ||
|
||
|
||
class Auction(MainModel): | ||
# start date is given by MainMode's created_at date | ||
end_date = models.DateTimeField(editable=False) |
Oops, something went wrong.