From ff0a07f69abccade19186594b3c3d5853160c47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20M=C3=A9ry?= Date: Mon, 22 Jul 2024 11:00:53 +0200 Subject: [PATCH] fix(ci): fix bad use of poetry groups --- .github/actions/setup-poetry/action.yml | 8 ++++++-- .github/workflows/pytest.yml | 2 +- .github/workflows/python-publish.yml | 9 ++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-poetry/action.yml b/.github/actions/setup-poetry/action.yml index fb5ce27..a8ced96 100644 --- a/.github/actions/setup-poetry/action.yml +++ b/.github/actions/setup-poetry/action.yml @@ -1,5 +1,8 @@ +--- name: Set up poetry + description: Install poetry and python dependencies + inputs: groups: description: "Poetry dependencies groups." @@ -7,6 +10,7 @@ inputs: python-version: description: "Python version." required: true + runs: using: "composite" steps: @@ -29,9 +33,9 @@ runs: uses: actions/cache@v3 with: path: .venv - key: venv-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ inputs.groups }} + key: venv-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install Poetry dependencies shell: bash - run: poetry install --no-interaction --no-root --only main,${{ inputs.groups }} + run: poetry install --no-interaction --no-root --only ${{ inputs.groups }} if: steps.cache-deps.outputs.cache-hit != 'true' diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 19abe87..76f7859 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Poetry uses: ./.github/actions/setup-poetry with: - groups: test + groups: main,test python-version: ${{ matrix.python-version }} - name: Print versions diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4eecdf2..77f1de3 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,5 +1,4 @@ --- - name: python-publish on: @@ -15,17 +14,17 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up python 3.11 + - name: Set up python 3.12 id: setup-python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: "3.12" - name: Set up Poetry uses: ./.github/actions/setup-poetry with: - groups: '' # will only install the main group - python-version: '3.11' + groups: main + python-version: "3.12" - name: Publish package run: poetry publish --build