@@ -10,63 +10,65 @@ jobs:
10
10
name : Consult black on python formatting
11
11
12
12
steps :
13
- - uses : actions/checkout@v1
14
- - uses : actions/setup-python@v1
13
+ - uses : actions/checkout@v2
14
+ - uses : actions/setup-python@v2
15
15
with :
16
16
python-version : 3.7
17
- - uses : dschep/install-pipenv-action@v1
17
+ - uses : Gr1N/setup-poetry@v2
18
+ - uses : actions/cache@v2
19
+ with :
20
+ path : ~/.cache/pypoetry/virtualenvs
21
+ key : ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
22
+ restore-keys : |
23
+ ${{ runner.os }}-poetry-
18
24
- name : Install dependencies
19
- run : |
20
- pipenv install --dev --python ${pythonLocation}/python
25
+ run : poetry install
21
26
- name : Run black
22
- run : |
23
- pipenv run black . --check --diff --exclude tests/output_
27
+ run : make check-style
24
28
25
29
run-tests :
26
30
runs-on : ubuntu-latest
27
31
32
+ name : Run tests with tox
33
+
28
34
strategy :
29
35
matrix :
30
- python-version : [ '3.6', '3.7' ]
31
-
32
- name : Python ${{ matrix.python-version }} test
36
+ python-version : [ '3.6', '3.7', '3.8']
33
37
34
38
steps :
35
- - uses : actions/checkout@v1
36
- - uses : actions/setup-python@v1
39
+ - uses : actions/checkout@v2
40
+ - uses : actions/setup-python@v2
37
41
with :
38
42
python-version : ${{ matrix.python-version }}
39
- - uses : dschep/install-pipenv-action@v1
43
+ - uses : Gr1N/setup-poetry@v2
44
+ - uses : actions/cache@v2
45
+ with :
46
+ path : ~/.cache/pypoetry/virtualenvs
47
+ key : ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
48
+ restore-keys : |
49
+ ${{ runner.os }}-poetry-
40
50
- name : Install dependencies
41
51
run : |
42
52
sudo apt install protobuf-compiler libprotobuf-dev
43
- pipenv install --dev --python ${pythonLocation}/python
53
+ poetry install
44
54
- name : Run tests
45
55
run : |
46
- cp .env.default .env
47
- pipenv run pip install -e .
48
- pipenv run generate
49
- pipenv run test
56
+ make generate
57
+ make test
50
58
51
59
build-release :
52
60
runs-on : ubuntu-latest
53
61
54
62
steps :
55
- - uses : actions/checkout@v1
56
- - uses : actions/setup-python@v1
63
+ - uses : actions/checkout@v2
64
+ - uses : actions/setup-python@v2
57
65
with :
58
66
python-version : 3.7
59
- - uses : dschep/install-pipenv-action@v1
60
- - name : Install dependencies
61
- run : |
62
- sudo apt install protobuf-compiler libprotobuf-dev
63
- pipenv install --dev --python ${pythonLocation}/python
67
+ - uses : Gr1N/setup-poetry@v2
64
68
- name : Build package
69
+ run : poetry build
70
+ - name : Publish package to PyPI
65
71
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
66
- run : pipenv run python setup.py sdist
67
- - name : Publish package
68
- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
69
-
70
- with :
71
- user : __token__
72
- password : ${{ secrets.pypi }}
72
+ run : poetry publish -n
73
+ env :
74
+ POETRY_PYPI_TOKEN_PYPI : ${{ secrets.pypi }}
0 commit comments