-
Notifications
You must be signed in to change notification settings - Fork 89
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
refactor(ci, build): Simplify build process and developer workflow for running tests and container builds #125
Conversation
* add check for existing user from entrypoint script, to avoid cycle of overwriting user credentials on subsequent container restarts * superuser is created on first start * use module syntax of downloading nltk data (no functional changes) * Update Dockerfile to use buildkit * Add OCI labels to Dockerfile, includes reference URL for info, repo URL, description, license, and git hash when built via Makefile * Use cache volumes in Dockerfile for apt/pip to speed up subsequent builds * Add Makefile to simplify common tasks for users * TODO: Add Makefile usage notes to README * Add Github super-linter configuration for CI to lint python code, shell scripts, and dockerfiles * Add pre-commit to run standard lint checks on git commit
…use master * Update `docker-compose.yml` link in README to point to specific release within git (ties to specific release of file, and makes file location independent from repository structure and branch) * Update references to `develop` branch in CONTRIBUTING.md guide to reference `master` as `develop` branch does not exist on this repo * Update branch references in new CI lint check
* loosen python version in Makefile to python3 (project supports 3.7+) * Move default venv to .venv to simplify makefile * Explicitly specify python3 in dockerfile during build
* add install-dev as dep of test target * alphabetize python requirements, a sort a day keeps the ocd away * pin version of `django-rest-framework` to allow scanning by safety * add coverage files and other standard git ignores to `.gitignore`
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
=======================================
Coverage 94.43% 94.43%
=======================================
Files 20 20
Lines 827 827
=======================================
Hits 781 781
Misses 46 46 Continue to review full report at Codecov.
|
* use full path to entrypoint script in Dockerfile
… log viewing of compose application
* add flake8 ignore of E203 (black and flake8 compat) * remove references to `develop` branch * remove redundant ignore settings * bump django version in requirements to pass safety security check
* currently partially commented out for quick test
trigger github to recognize new workflow
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
What Changed
PR adds some automation and shortcuts to simplify common developer/user usage scenarios and best practices.
Release Process
latest
tag.Linting
Makefile
make build-container
, automatically adds OCI label with git hash to built image),make venv
),make test
, via tox),make help
ormake
with no arguments will print summary of make targets available)Container
.dockerignore
Docs
CONTRIBUTING.md
doc to referencemaster
branch (develop
branch does not exist on repo)docker-compose.yml
link in README to point to specific release within git (ties to specific release of file, and makes file location independent from repository structure and branch)Misc
django-rest-framework
to allow scanning by safetyLimitations