Skip to content

Commit

Permalink
Update windows-exe.yml
Browse files Browse the repository at this point in the history
reworked steps
  • Loading branch information
jimkring authored Jun 29, 2022
1 parent 1647b19 commit d2df278
Showing 1 changed file with 18 additions and 49 deletions.
67 changes: 18 additions & 49 deletions .github/workflows/windows-exe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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


0 comments on commit d2df278

Please sign in to comment.