♻️ Refactored GitHub actions using own env action.

This commit is contained in:
Robert Honz
2024-01-12 13:38:12 +01:00
parent a30ee0550d
commit 0cba5d83b1
2 changed files with 8 additions and 35 deletions
+4 -2
View File
@@ -11,7 +11,7 @@ runs:
using: "composite" using: "composite"
steps: steps:
- name: Set up python - name: Set up python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
@@ -19,6 +19,8 @@ runs:
uses: snok/install-poetry@v1 uses: snok/install-poetry@v1
with: with:
virtualenvs-in-project: true virtualenvs-in-project: true
virtualenvs-create: true
installer-parallel: true
- name: Load cached venv - name: Load cached venv
id: cached-poetry-dependencies id: cached-poetry-dependencies
@@ -29,5 +31,5 @@ runs:
- name: Install dependencies - name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction run: poetry install --no-interaction --all-extras --with dev,docs
shell: bash shell: bash
+4 -33
View File
@@ -63,20 +63,8 @@ jobs:
steps: steps:
- name: Check out - name: Check out
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install Poetry - name: Set up the environment
uses: snok/install-poetry@v1 uses: ./.github/actions/setup-poetry-env
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --with docs
- name: Deploy documentation - name: Deploy documentation
run: poetry run mkdocs gh-deploy --force run: poetry run mkdocs gh-deploy --force
compute: compute:
@@ -150,25 +138,8 @@ jobs:
steps: steps:
- name: Check out - name: Check out
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up python - name: Set up the environment
uses: actions/setup-python@v5 uses: ./.github/actions/setup-poetry-env
with:
python-version: "3.11"
# architecture: "x64"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies NOT Windows
run: poetry install --no-interaction --all-extras --with dev
- name: Build with pyinstaller for ${{matrix.TARGET}} - name: Build with pyinstaller for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}} run: ${{matrix.CMD_BUILD}}
- name: Load Release URL File from release job - name: Load Release URL File from release job