@@ -10,63 +10,65 @@ jobs:
1010 name : Consult black on python formatting
1111
1212 steps :
13- - uses : actions/checkout@v1
14- - uses : actions/setup-python@v1
13+ - uses : actions/checkout@v2
14+ - uses : actions/setup-python@v2
1515 with :
1616 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-
1824 - name : Install dependencies
19- run : |
20- pipenv install --dev --python ${pythonLocation}/python
25+ run : poetry install
2126 - name : Run black
22- run : |
23- pipenv run black . --check --diff --exclude tests/output_
27+ run : make check-style
2428
2529 run-tests :
2630 runs-on : ubuntu-latest
2731
32+ name : Run tests with tox
33+
2834 strategy :
2935 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']
3337
3438 steps :
35- - uses : actions/checkout@v1
36- - uses : actions/setup-python@v1
39+ - uses : actions/checkout@v2
40+ - uses : actions/setup-python@v2
3741 with :
3842 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-
4050 - name : Install dependencies
4151 run : |
4252 sudo apt install protobuf-compiler libprotobuf-dev
43- pipenv install --dev --python ${pythonLocation}/python
53+ poetry install
4454 - name : Run tests
4555 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
5058
5159 build-release :
5260 runs-on : ubuntu-latest
5361
5462 steps :
55- - uses : actions/checkout@v1
56- - uses : actions/setup-python@v1
63+ - uses : actions/checkout@v2
64+ - uses : actions/setup-python@v2
5765 with :
5866 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
6468 - name : Build package
69+ run : poetry build
70+ - name : Publish package to PyPI
6571 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- uses : pypa/gh-action-pypi-publish@v1.0.0a0
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