.drone.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. kind: pipeline
  2. name: default
  3. steps:
  4. # 测试
  5. - name: code-test
  6. image: python:3.9
  7. volumes:
  8. - name: cache
  9. path: /opt/web/test
  10. commands:
  11. - pip install pytest-html -i https://mirrors.cloud.tencent.com/pypi/simple
  12. - pip install pytest-xdist -i https://mirrors.cloud.tencent.com/pypi/simple
  13. - pip install -r requirements.txt -i https://mirrors.cloud.tencent.com/pypi/simple
  14. - PATH=$PATH:/drone/src
  15. - pytest -v ./ --maxfail 10 --pastebin=all --html=/opt/web/test/py_test_report.html
  16. #- pytest -v ./ -n 5 --maxfail 10 --pastebin=all --html=/opt/web/test/py_test_report.html
  17. #failure: "fail-fast"
  18. - name: dingtalk
  19. image: lddsb/drone-dingtalk-message
  20. settings:
  21. token: 178f267b9b16b168e0a0afb223b3d41f3a58e62180ab5288aa576db02965dd72
  22. type: markdown
  23. success_color: 008000
  24. failure_color: FF0000
  25. success_pic: https://img1.baidu.com/it/u=1968518221,4002244040&fm=253&fmt=auto&app=138&f=JPEG?w=640&h=400
  26. msg_at_mobiles: 15858193327
  27. # https://test.itlym.cn/py_test_report.html
  28. volumes:
  29. - name: cache
  30. host:
  31. path: /opt/web/test
  32. trigger:
  33. branch:
  34. - master
  35. event:
  36. - push