소스 검색

Add drone file

Colin Powell 3 년 전
부모
커밋
e203141902
1개의 변경된 파일32개의 추가작업 그리고 0개의 파일을 삭제
  1. 32 0
      .drone.yml

+ 32 - 0
.drone.yml

@@ -0,0 +1,32 @@
+---
+################
+# Build & Test #
+################
+
+kind: pipeline
+name: run_tests
+
+steps:
+  # Run tests against Python/Flask engine backend (with pytest)
+  - name: django_tests
+    image: python:3.10.4
+    commands:
+      # Install dependencies
+      - cp emus.conf.example emus.conf
+      - pip install poetry
+      - poetry install
+      # Start with a fresh database (which is already running as a service from Drone)
+      - poetry run python manage.py test
+    environment:
+      EMUS_DATABASE_URL: sqlite3:///test.db
+    volumes:
+      # Mount pip cache from host
+      - name: pip_cache
+        path: /root/.cache/pip
+volumes:
+  - name: docker
+    host:
+      path: /var/run/docker.sock
+  - name: pip_cache
+    host:
+      path: /tmp/cache/drone/pip