7
7
PACKAGE_DIR : arango_datasets
8
8
TESTS_DIR : tests
9
9
jobs :
10
- lint :
11
- runs-on : ubuntu-latest
12
- strategy :
13
- matrix :
14
- python : ["3.8", "3.9", "3.10"]
15
- name : Lint - Python ${{ matrix.python }}
16
- steps :
17
- - uses : actions/checkout@v2
18
- - name : Setup Python ${{ matrix.python }}
19
- uses : actions/setup-python@v2
20
- with :
21
- python-version : ${{ matrix.python }}
22
- - name : Install packages
23
- run : pip install .[dev]
24
- - name : Run black
25
- run : black --check --verbose --diff --color ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
26
- - name : Run flake8
27
- run : flake8 ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
28
- - name : Run isort
29
- run : isort --check --profile=black ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
30
- - name : Run mypy
31
- run : mypy ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
32
- - name : Run bandit
33
- run : bandit --exclude "./tests/*" -r ./
34
- test :
35
- needs : lint
36
- runs-on : ubuntu-latest
37
- strategy :
38
- matrix :
39
- python : ["3.8", "3.9", "3.10"]
40
- name : Test - Python ${{ matrix.python }}
41
- steps :
42
- - uses : actions/checkout@v2
43
- - name : Setup Python ${{ matrix.python }}
44
- uses : actions/setup-python@v2
45
- with :
46
- python-version : ${{ matrix.python }}
47
- - name : Set up ArangoDB Instance via Docker
48
- run : docker create --name adb -p 8529:8529 -e ARANGO_ROOT_PASSWORD=openSesame arangodb/arangodb:3.10.0
49
- - name : Start ArangoDB Instance
50
- run : docker start adb
51
- - name : Setup pip
52
- run : python -m pip install --upgrade pip setuptools wheel
53
- - name : Install packages
54
- run : pip install .[dev]
55
- - name : Run pytest
56
- run : pytest --cov=${{env.PACKAGE_DIR}} --cov-report xml --cov-report term-missing -v --color=yes --no-cov-on-fail --code-highlight=yes --cov-fail-under=75
57
-
58
10
release :
59
- needs : [lint, test]
60
11
runs-on : ubuntu-latest
61
12
name : Release package
62
13
steps :
@@ -66,24 +17,22 @@ jobs:
66
17
run : git fetch --prune --unshallow
67
18
68
19
- name : Setup python
69
- uses : actions/setup-python@v2
20
+ uses : actions/setup-python@v4
70
21
with :
71
- python-version : " 3.8 "
22
+ python-version : " 3.10 "
72
23
73
24
- name : Install release packages
74
- run : pip install setuptools wheel twine setuptools-scm[toml]
75
-
76
- - name : Install dependencies
77
- run : pip install .[dev]
25
+ run : pip install build twine
78
26
79
27
- name : Build distribution
80
- run : python setup.py sdist bdist_wheel
28
+ run : python -m build
81
29
82
30
- name : Publish to PyPI Test
83
31
env :
84
32
TWINE_USERNAME : __token__
85
33
TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD_TEST }}
86
34
run : twine upload --repository testpypi dist/* # --skip-existing
35
+
87
36
- name : Publish to PyPI
88
37
env :
89
38
TWINE_USERNAME : __token__
0 commit comments