From ab3ca9cda57a06a273768494c86af68b4c03b018 Mon Sep 17 00:00:00 2001 From: Sandeep Somasekharan Date: Sun, 9 May 2021 14:07:53 +0530 Subject: [PATCH] update github actions --- .github/workflows/pypi-publish.yml | 9 +++++++-- .github/workflows/run-pytest.yml | 13 ++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 123e799..264e3fa 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -15,14 +15,19 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.8' + - name: Install and configure poetry + uses: snok/install-poetry@v1.1.4 + with: + version: 1.1.6 + virtualenvs-create: false - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install -U setuptools wheel twine - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - python setup.py sdist bdist_wheel + poetry build twine upload dist/* diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index c087901..a22243a 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -23,14 +23,17 @@ jobs: run: ./.github/scripts/extract_files.sh env: FILES_PASSPHRASE: ${{ secrets.FILES_PASSPHRASE }} + - name: Install and configure poetry + uses: snok/install-poetry@v1.1.4 + with: + version: 1.1.6 + virtualenvs-create: false - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f requirements-mupdf.txt ]; then pip install -r requirements-mupdf.txt; fi - if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi + run: poetry install -E mupdf + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - name: Test with pytest run: | + pip install . pytest env: BAD_CAS_FILE: ${{ secrets.BAD_CAS_FILE }}