瀏覽代碼

Fix manage command using wrong module and update drone

Colin Powell 1 年之前
父節點
當前提交
6270e94f2c
共有 2 個文件被更改,包括 27 次插入1 次删除
  1. 26 0
      .drone.yml
  2. 1 1
      manage.py

+ 26 - 0
.drone.yml

@@ -7,12 +7,14 @@ kind: pipeline
 name: run_tests
 
 steps:
+  # Run tests against Python/Flask engine backend (with pytest)
   - name: pytest with coverage
     image: python:3.11.1
     commands:
       # Install dependencies
       - cp emus.conf.example emus.conf
       - pip install poetry
+      - poetry config repositories.unblink "https://pypi.unbl.ink/pypi/simple"
       - poetry install
       # Start with a fresh database (which is already running as a service from Drone)
       - poetry run pytest --cov-report term:skip-covered --cov=emus tests
@@ -40,6 +42,30 @@ steps:
     when:
       branch:
       - main
+  - name: build success notification
+    image: parrazam/drone-ntfy
+    when:
+        status: [success]
+    settings:
+      url: https://ntfy.unbl.ink
+      topic: drone
+      priority: low
+      tags:
+        - cd
+        - failure
+        - vrobbler
+  - name: build failure notification
+    image: parrazam/drone-ntfy
+    when:
+        status: [failure]
+    settings:
+      url: https://ntfy.unbl.ink
+      topic: drone
+      priority: high
+      tags:
+        - cd
+        - success
+        - vrobbler
 volumes:
   - name: docker
     host:

+ 1 - 1
manage.py

@@ -6,7 +6,7 @@ import sys
 
 def main():
     """Run administrative tasks."""
-    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'emus-web.settings')
+    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'emus_web.settings')
     try:
         from django.core.management import execute_from_command_line
     except ImportError as exc: