/
.drone.yml
46 lines (43 loc) · 1.24 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
kind: pipeline
type: docker
name: test
steps:
- name: Test Python
image: python:3.11
commands:
- curl -L "https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-$(dpkg --print-architecture)" > "${HOME}/bin/cc-test-reporter"
- chmod +x "${HOME}/bin/cc-test-reporter"
- python setup.py develop
- pip install -r requirements-test.txt
- ruff check .
- mypy .
- cc-test-reporter before-build
- coverage run -m unittest
- exitcode="$?"
- coverage xml
- cc-test-reporter after-build --exit-code "$exitcode"
environment:
CC_TEST_REPORTER_ID: 4376447242698573f009af93594132883f11a7c877b87b02563ffddd4949e88b
- name: Test Python Packaging
image: python:3.11
commands:
- pip install twine
- python setup.py sdist bdist_wheel
- twine check --strict dist/*
- name: Upload Python
depends_on:
- Test Python
- Test Python Packaging
environment:
TWINE_USERNAME:
from_secret: twine_username
TWINE_PASSWORD:
from_secret: twine_password
image: python:3.11
commands:
- pip install twine
- python setup.py sdist bdist_wheel
- twine upload dist/*
when:
event:
- tag