gardenbuilder-app / gardenbuilder-backend-python

Django-based REST API
6 stars 11 forks source link

Github workflow with testing and code quality jobs #45

Closed andrew-the-drawer closed 3 years ago

andrew-the-drawer commented 3 years ago

Related to:

Resolve issue #8

Description:

Create github workflow to automatically run unit test and pylint app

Tests:

Description of any tests you may have written to support this feature, if any. Tests are appreciated for all features of the app.

Checklist:

Please put an x in each box that you have completed

Tasks:

andrew-the-drawer commented 3 years ago

I hope that this PR will be counted as my Hacktoberfest contribution according to this new updates

andrew-the-drawer commented 3 years ago

This looks awesome but I'm concerned about hard-coding the environment variables into the ci.yml file. Can that file access secrets that I've put in the github repo? If so we can update ci.yml with them and I'll add the necessary secrets.

Of course, you can. Take a look: Sharing secrets in Github.

Btw, pls send me the names and values of those secrets you intended to add so I can re-configurate the workflow.

P/S: Here, take a look at the result: image

capndave commented 3 years ago

Secret names are below. There's a small chance I have the wrong port in the secret but otherwise should work.

DB_HOST_CLOUD DB_NAME DB_PASSWORD DB_PORT DB_USER DJANGO_SECRET_KEY

andrew-the-drawer commented 3 years ago

Nice. Btw I don't think DB_HOST_CLOUD is useful for testing jobs, since all the services are initialized in the same network. Unless you want me to create a job for cloud deployment as well.... Please lemme know as soon as possible.

capndave commented 3 years ago

@lantrungseo my bad, changing it to DB_HOST now.

andrew-the-drawer commented 3 years ago

@capndave I have changed to secrets as you said. Please review!