From 0cba5d83b1bfa212d3bdb7719f90740f513f01c2 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Fri, 12 Jan 2024 13:38:12 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Refactored=20GitHub=20acti?= =?UTF-8?q?ons=20using=20own=20env=20action.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/setup-poetry-env/action.yml | 6 ++-- .github/workflows/on-release-master.yml | 37 +++------------------ 2 files changed, 8 insertions(+), 35 deletions(-) diff --git a/.github/actions/setup-poetry-env/action.yml b/.github/actions/setup-poetry-env/action.yml index 22e4053..8b299f7 100644 --- a/.github/actions/setup-poetry-env/action.yml +++ b/.github/actions/setup-poetry-env/action.yml @@ -11,7 +11,7 @@ runs: using: "composite" steps: - name: Set up python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} @@ -19,6 +19,8 @@ runs: uses: snok/install-poetry@v1 with: virtualenvs-in-project: true + virtualenvs-create: true + installer-parallel: true - name: Load cached venv id: cached-poetry-dependencies @@ -29,5 +31,5 @@ runs: - name: Install dependencies 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 diff --git a/.github/workflows/on-release-master.yml b/.github/workflows/on-release-master.yml index f1e38df..7127182 100644 --- a/.github/workflows/on-release-master.yml +++ b/.github/workflows/on-release-master.yml @@ -63,20 +63,8 @@ jobs: steps: - name: Check out uses: actions/checkout@v4 - - 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 - run: poetry install --no-interaction --with docs + - name: Set up the environment + uses: ./.github/actions/setup-poetry-env - name: Deploy documentation run: poetry run mkdocs gh-deploy --force compute: @@ -150,25 +138,8 @@ jobs: steps: - name: Check out uses: actions/checkout@v4 - - name: Set up python - uses: actions/setup-python@v5 - 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: Set up the environment + uses: ./.github/actions/setup-poetry-env - name: Build with pyinstaller for ${{matrix.TARGET}} run: ${{matrix.CMD_BUILD}} - name: Load Release URL File from release job