Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: astral-sh/setup-uv
# You may pin to the exact commit or the version.
# uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a
uses: astral-sh/setup-uv@v5.1.0
with:
# The version of uv to install
#version: # optional, default is latest
# The version of Python to set UV_PYTHON to
python-version: 3.10.6
# The checksum of the uv version to install
#checksum: # optional
# Used to increase the rate limit when retrieving versions and downloading uv.
#github-token: # optional, default is ${{ github.token }}
# Enable caching of the uv cache
#enable-cache: # optional, default is auto
# Glob pattern to match files relative to the repository root to control the cache.
#cache-dependency-glob: # optional, default is **/uv.lock **/requirements*.txt

# Suffix for the cache key
#cache-suffix: # optional
# Local path to store the cache.
#cache-local-path: # optional, default is
# Prune cache before saving.
#prune-cache: # optional, default is true
# Ignore when nothing is found to cache.
#ignore-nothing-to-cache: # optional, default is false
# Custom path to set UV_TOOL_DIR to.
#tool-dir: # optional
# Custom path to set UV_TOOL_BIN_DIR to.
#tool-bin-dir: # optional
- name: Install Dependencies
# Need to run lock or else it also tries to install Windows dependencies
run: |
uv lock
uv sync
- name: Test with pytest
run: |
uv run pytest tests
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ dependencies = [
"attrs>=24.3.0",
"pillow>=11.1.0",
"pyuac>=0.0.3",
"pywin32>=308",
"pywin32>=308 ; sys_platform == 'win32'",
"pywinpty>=2.0.14",
"pywinpty>=2.0.14 ; sys_platform == 'win32'",
"sv-ttk>=2.6.0",
"tk>=0.1.0",
]
Expand Down
5 changes: 4 additions & 1 deletion src/msix_global_installer/msix.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
from dataclasses import dataclass
from math import ceil
from msix_global_installer import events
from winpty import PtyProcess
import logging
import os
import pathlib
import re
import xml.etree.ElementTree as ET
import zipfile
import sys

if sys.platform == "win32":
from winpty import PtyProcess


logger = logging.getLogger(__name__)
Expand Down
5 changes: 0 additions & 5 deletions tests/test_msix.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ def test_get_msix_metadata(self, tmpdir):
assert data.publisher == 'Contoso Corporation'
assert data.package_path == path

def test_install(self):
"""Test we can install with a subprocess."""
path = pathlib.Path("tests/TestMsixPackage.msix")
msix.install_msix(path)

def test_count_percentage(self):
"""Test we can count the progress."""
test_start = r" [ ] \r\n"
Expand Down
7 changes: 3 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading