From 6f6430e787c73312896683e6cdc3d0e8f0549fdc Mon Sep 17 00:00:00 2001 From: Benjamin Dornel Date: Mon, 30 Oct 2023 00:00:25 +0800 Subject: [PATCH] refactor(ci): only install dev dependencies for ci --- .github/actions/setup-python-poetry/action.yml | 7 +++++-- .github/workflows/ci.yaml | 6 +----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-python-poetry/action.yml b/.github/actions/setup-python-poetry/action.yml index e31ae75e..054c2930 100644 --- a/.github/actions/setup-python-poetry/action.yml +++ b/.github/actions/setup-python-poetry/action.yml @@ -8,6 +8,9 @@ inputs: poetry-version: description: 'Poetry version' required: true + installation-arguments: + descriptions: 'Poetry installation arguments' + required: false runs: using: 'composite' @@ -43,9 +46,9 @@ runs: - name: Install dependencies if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root + run: poetry install --no-interaction --no-root ${{ inputs.installation-arguments }} shell: bash - name: Install project - run: poetry install --no-interaction + run: poetry install --no-interaction ${{ inputs.installation-arguments }} shell: bash diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9e4e45bc..bd20dfef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,16 +9,12 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Install pdftotext - run: | - sudo apt-get update - sudo apt-get -y install build-essential libpoppler-cpp-dev pkg-config - - name: Setup Python & Poetry uses: ./.github/actions/setup-python-poetry with: python-version: "3.11" poetry-version: "1.6.1" + installation-arguments: --only dev - name: Run CI run: poetry run task format && poetry run task lint && poetry run task mypy