Skip to content

Commit

Permalink
ci(github): update poetry version
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhd1701 committed Nov 30, 2022
1 parent bd8e96e commit e09a805
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/release_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:

env:
BUILD_PYTHON_VERSION: 3.8
BUILD_POETRY_VERSION: 1.1.13
BUILD_POETRY_VERSION: 1.2.2
PACKAGE_NAME: evernote-backup

jobs:
release:
publish_pypi:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -21,10 +22,10 @@ jobs:
with:
python-version: ${{ env.BUILD_PYTHON_VERSION }}

- name: Set up Poetry ${{ env.BUILD_POETRY_VERSION }}
uses: abatilo/actions-poetry@v2.0.0
- name: Install Poetry ${{ env.BUILD_POETRY_VERSION }}
uses: snok/install-poetry@v1
with:
poetry-version: ${{ env.BUILD_POETRY_VERSION }}
version: ${{ env.BUILD_POETRY_VERSION }}

- name: Build project for distribution
run: poetry build
Expand All @@ -34,8 +35,12 @@ jobs:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish

publish_tap:
needs: [publish_pypi]
runs-on: ubuntu-latest
steps:
- name: Update Homebrew formula
uses: dawidd6/action-homebrew-bump-formula@v3
with:
token: ${{secrets.BREW_BUMP_TOKEN}}
formula: evernote-backup
token: ${{ secrets.BREW_BUMP_TOKEN }}
formula: ${{ env.PACKAGE_NAME }}
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- "**/version.py"

env:
BUILD_POETRY_VERSION: 1.1.13
BUILD_POETRY_VERSION: 1.2.2
PACKAGE_NAME: evernote_backup

jobs:
Expand All @@ -35,13 +35,14 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Load cached Poetry installation
if: matrix.os != 'windows-latest'
uses: actions/cache@v2
with:
path: ~/.local
key: dotlocal-${{ matrix.os }}-${{ env.BUILD_POETRY_VERSION }}
key: dotlocal-${{ matrix.os }}-${{ matrix.python-version }}-${{ env.BUILD_POETRY_VERSION }}

- name: Install Poetry ${{ env.BUILD_POETRY_VERSION }}
uses: snok/install-poetry@v1
uses: snok/install-poetry@v1.3.3
with:
version: ${{ env.BUILD_POETRY_VERSION }}
installer-parallel: false
Expand All @@ -57,11 +58,12 @@ jobs:

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
shell: bash
run: poetry install --no-interaction --no-root

- name: Run tests
run: |
poetry run pytest --cov-report=xml --cov=${{ env.PACKAGE_NAME }} tests/
shell: bash
run: poetry run pytest --cov-report=xml --cov=${{ env.PACKAGE_NAME }} tests/

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:buster-slim AS build

ENV BUILD_POETRY_VERSION=1.1.13
ENV BUILD_POETRY_VERSION=1.2.2

RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends --yes python3-venv python3-pip && \
Expand Down

0 comments on commit e09a805

Please sign in to comment.