Skip to content

Commit

Permalink
ci: PLT-525: simplify poetry install action
Browse files Browse the repository at this point in the history
  • Loading branch information
farioas committed Oct 23, 2024
1 parent cbc539c commit 7542851
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 32 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ jobs:
version=$(sed "s/^v//g" <<< ${PROVIDED_VERSION})
sed -i "s/^version[ ]*=.*/version = \"${version}\"/g" ${{ env.PYTHON_VERSION_FILE }}
- name: Set up poetry
uses: snok/install-poetry@v1
- name: "Install poetry"
run: pipx install poetry

- name: "Set up Python"
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: true
cache: 'poetry'

- name: Install dependencies
run: |
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up poetry
uses: snok/install-poetry@v1
- name: "Install poetry"
run: pipx install poetry

- name: "Set up Python"
id: setup_python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: true
python-version: '3.11'
cache: 'poetry'

- name: Install Python dependencies
run: |
Expand All @@ -45,11 +49,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up poetry
uses: snok/install-poetry@v1
- name: "Install poetry"
run: pipx install poetry

- name: "Set up Python"
id: setup_python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: true
python-version: '3.11'
cache: 'poetry'

- name: Install Python dependencies
run: |
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/follow-merge-upstream-repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,15 @@ jobs:
our_files: "pyproject.toml poetry.lock web/package.json web/yarn.lock"
working_directory: "${{ env.UPSTREAM_REPO_WORKDIR }}"

- name: "Poetry: Set up"
if: steps.details.outputs.poetry
uses: Gr1N/setup-poetry@v9
- name: "Install poetry"
run: pipx install poetry

- name: "Set up Python"
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'poetry'

- name: Commit submodule
shell: bash
Expand Down
32 changes: 14 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up poetry
uses: snok/install-poetry@v1
- name: "Install poetry"
run: pipx install poetry

- name: "Set up Python"
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: true
cache: 'poetry'

- name: Install Python dependencies
run: poetry install
Expand All @@ -60,23 +64,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: "Install poetry"
run: pipx install poetry

- name: Set up poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v4
- name: "Set up Python ${{ matrix.python-version }}"
id: setup_python
uses: actions/setup-python@v5
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
python-version: '${{ matrix.python-version }}'
cache: 'poetry'

- name: Install dependencies
run: poetry install --no-interaction --no-root
Expand Down

0 comments on commit 7542851

Please sign in to comment.