This is a working application that you can use to learn how to build, test and deploy with CircleCI 2.0. Follow the Project Walkthrough guide here.
It's a 'social blogging' web application similar to Twitter. Users can create accounts, make posts, follow users and comment on posts. You can circualate your thoughts and ideas :-)
Original Author Credit: This is directly based on Miguel Grinberg's excellent Flasky application.
The application uses Python and Flask for the backend.
IMPORTANT:
- You do not need to know Python to follow the guide in the CircleCI docs.
- You will not need to install or setup a Python environment to follow the tutorial - you can follow along by making edits to config on GitHub if you wish.
- No matter what language or stack you are going to use with CircleCI, we recommend following the walkthrough first, as it introduces concepts about CircleCI that you can then apply to your own project.
Note: As mentioned above you don't need to run this application locally to learn about using CircleCI.
- Install PostgreSQL (tested with 9.6.2)
- Install Python (tested with Python 3.6)
- Fork or clone this repository
- Create and activate a virtual environment
- Enter the following commands:
createdb circulate
pip install -r requirements/dev.txt
python manage.py db init
python manage.py db migrate
python manage.py db upgrade
then:
python mange.py shell
and run the following command to set up Roles:
Role.insert_roles()
The app runs various tests:
- unit tests for database models (using unittest)
- unit tests for client view functions (using Flask Test Client)
- unit tests for the API (using Flask Test Client)
- integration tests for logging in etc (using Selenium and ChromeDriver)
It uses unittest-xml-reporting for JUNIT style report generation.
See the tests
directory for details.
python manage.py test
to run the tests locally.
-
add parallelization
-
deploy to Heroku
-
test with multiple python versions
-
run with coverage on CircleCI
-
add coverage badge to README
-
make email testing work on CircleCI with mailhog