From d2df2788008de49e0368d5ed291c40a5a473b602 Mon Sep 17 00:00:00 2001 From: Jim Kring Date: Wed, 29 Jun 2022 15:36:36 -0700 Subject: [PATCH] Update windows-exe.yml reworked steps --- .github/workflows/windows-exe.yml | 67 +++++++++---------------------- 1 file changed, 18 insertions(+), 49 deletions(-) diff --git a/.github/workflows/windows-exe.yml b/.github/workflows/windows-exe.yml index 15c8c2f..8a4a253 100644 --- a/.github/workflows/windows-exe.yml +++ b/.github/workflows/windows-exe.yml @@ -6,57 +6,26 @@ jobs: test: runs-on: windows-latest steps: - #---------------------------------------------- - # check-out repo and set-up python - #---------------------------------------------- + - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Install poetry + run: pipx install poetry + - name: Set up python - id: setup-python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: 3.10 - #---------------------------------------------- - # ----- install & configure poetry ----- - #---------------------------------------------- - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - #---------------------------------------------- - # load cached venv if cache exists - #---------------------------------------------- - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v2 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - #---------------------------------------------- - # install dependencies if cache does not exist - #---------------------------------------------- - - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + python-version: '3.10' + cache: 'poetry' + + - name: Install Dependencies run: poetry install --no-interaction --no-root - #---------------------------------------------- - # install your root project, if required - #---------------------------------------------- - - name: Install library - run: poetry install --no-interaction - #---------------------------------------------- - # run test suite - #---------------------------------------------- + - name: Run tests - run: | - source .venv/scripts/activate.ps1 - pytest tests/ - coverage report - #---------------------------------------------- - # build exe - #---------------------------------------------- - - name: Build exe - run: | - source .venv/scripts/activate.ps1 - python -m nuitka --standalone --onefile --output-dir="build" kasa_cli + run: poetry run pytest + + - name: Build EXE + run: poetry run nuitka --standalone --onefile --output-dir="build" kasa_cli + +