浏览代码

Add drone file

Colin Powell 2 年之前
父节点
当前提交
ab00f5693a
共有 1 个文件被更改,包括 29 次插入0 次删除
  1. 29 0
      .drone.yml

+ 29 - 0
.drone.yml

@@ -0,0 +1,29 @@
+---
+################
+# Build & Test #
+################
+
+kind: pipeline
+name: run_tests
+
+steps:
+  # Run tests against Python/Flask engine backend (with pytest)
+  - name: pytest
+    image: python:3.10.4
+    commands:
+      # Install dependencies
+      - pip install poetry
+      - poetry install --all-extras
+      # Start with a fresh database (which is already running as a service from Drone)
+      - poetry run pytest
+    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