From de611a5a14887b3190520dd8ea7e628350663030 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Mon, 24 Jul 2023 13:28:07 +0300 Subject: [PATCH] Add the CI/CD configuration. --- .drone.yaml | 44 ++++++++++++++++++++++++++++++++++++ .env-example => .env.example | 0 CHANGELOG.org | 2 ++ dev_requirements.txt | 12 ++++++++++ tasks/tests/__init__.py | 0 5 files changed, 58 insertions(+) create mode 100644 .drone.yaml rename .env-example => .env.example (100%) create mode 100644 dev_requirements.txt create mode 100644 tasks/tests/__init__.py diff --git a/.drone.yaml b/.drone.yaml new file mode 100644 index 0000000..6f7fe13 --- /dev/null +++ b/.drone.yaml @@ -0,0 +1,44 @@ +kind: pipeline +type: docker +name: default + +steps: + - name: install dependencies + image: python:3.10-slim + volumes: + - name: package_cache + path: /package_cache + commands: + - cp .env.example .env + - pip install -r dev_requirements.txt --cache-dir=/package_cache + + - name: run migrations + image: python:3.10-slim + volumes: + - name: package_cache + path: /package_cache + commands: + - pip install -r dev_requirements.txt --cache-dir=/package_cache + - python manage.py migrate + + - name: run tests + image: python:3.10-slim + volumes: + - name: package_cache + path: /package_cache + commands: + - pip install -r dev_requirements.txt --cache-dir=/package_cache + - python manage.py test + +volumes: +- name: package_cache + temp: {} + +services: + - name: postgres + image: postgres:15-alpine + environment: + POSTGRES_DB: postgres_dev + POSTGRES_USER: postgres + POSTGRES_PASSWORD: testpassword + diff --git a/.env-example b/.env.example similarity index 100% rename from .env-example rename to .env.example diff --git a/CHANGELOG.org b/CHANGELOG.org index 69c1db0..5b205f5 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -32,4 +32,6 @@ Add the action to set the circular next status for Task items. ** 0.3.8 <2023-07-24 Mon> Update the database to use Postgres. +** 0.3.9 <2023-07-24 Mon> + Add the CI/CD configuration. diff --git a/dev_requirements.txt b/dev_requirements.txt new file mode 100644 index 0000000..46ecd5d --- /dev/null +++ b/dev_requirements.txt @@ -0,0 +1,12 @@ +asgiref==3.7.2 +crispy-tailwind==0.5.0 +Django==4.2.3 +django-browser-reload==1.11.0 +django-crispy-forms==2.0 +django-tailwind==3.6.0 +gunicorn==21.2.0 +packaging==23.1 +psycopg2-binary==2.9.6 +python-dotenv==1.0.0 +sqlparse==0.4.4 +typing_extensions==4.7.1 diff --git a/tasks/tests/__init__.py b/tasks/tests/__init__.py new file mode 100644 index 0000000..e69de29