Skip to content

Commit ce4e763

Browse files
committed
update pipeline
* remove cache for release * send only one coverage report * cache ~/.poetry
1 parent 5c1e6ef commit ce4e763

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,20 @@ jobs:
4040
uses: actions/cache@preview
4141
with:
4242
path: ~/.cache/pypoetry/virtualenvs
43-
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
43+
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.deps-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
4444
restore-keys: |
45-
${{ runner.os }}-${{ matrix.python-version }}-poetry-
45+
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.deps-version }}-poetry-
46+
- name: Poetry cache
47+
uses: actions/cache@preview
48+
with:
49+
path: ~/.poetry
50+
key: ${{ runner.os }}-${{ matrix.python-version }}-dotpoetry
51+
restore-keys: |
52+
${{ runner.os }}-${{ matrix.python-version }}-dotpoetry-
4653
- name: Install Python dependencies
4754
run: |
48-
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
55+
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
56+
pip install poetry
4957
$HOME/.poetry/bin/poetry install
5058
- name: Use lowest dependencies versions
5159
if: matrix.deps-version == 'lowest'
@@ -62,7 +70,7 @@ jobs:
6270
run: |
6371
$HOME/.poetry/bin/poetry run black --check src
6472
- name: Submit coverage report
65-
if: matrix.python-version == '3.8' && matrix.postgres-version == '12.1' && github.ref == 'refs/heads/master'
73+
if: matrix.python-version == '3.8' && matrix.postgres-version == '12.1' && matrix.deps-version == 'highest' && github.ref == 'refs/heads/master'
6674
env:
6775
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_TOKEN }}
6876
run: |
@@ -83,20 +91,12 @@ jobs:
8391
uses: actions/setup-python@v1
8492
with:
8593
python-version: ${{ matrix.python-version }}
86-
- name: virtualenv cache
87-
if: startsWith(github.ref, 'refs/tags/')
88-
uses: actions/cache@preview
89-
with:
90-
path: ~/.cache/pypoetry/virtualenvs
91-
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
92-
restore-keys: |
93-
${{ runner.os }}-${{ matrix.python-version }}-poetry-
9494
- name: Release to PyPI
9595
if: startsWith(github.ref, 'refs/tags/')
9696
env:
9797
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
9898
run: |
99-
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
99+
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
100100
$HOME/.poetry/bin/poetry install
101101
$HOME/.poetry/bin/poetry build
102102
$HOME/.poetry/bin/poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)