Skip to content

Commit

Permalink
Merge pull request #825 from Mohit-Gaur/main
Browse files Browse the repository at this point in the history
Extend magika wheels test to windows runner
  • Loading branch information
reyammer authored Dec 13, 2024
2 parents c4a9615 + 0126c51 commit 372aa1e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/python-build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ jobs:
- if: matrix.platform.runner != 'windows-latest'
name: Check that `uv add magika.whl` works
run: mkdir /tmp/test-uv && cp -vR dist/*.whl /tmp/test-uv && cd /tmp/test-uv && uv init && uv add ./$(\ls -1 *.whl | head -n 1)
- if: matrix.platform.runner == 'windows-latest'
name: Check that magika install with uv works on Windows
shell: pwsh
run: |
mkdir C:\test-uv
Copy-Item -Path dist\*.whl -Destination C:\test-uv
cd C:\test-uv
uv init
$wheel = Get-ChildItem -Filter *.whl | Select-Object -ExpandProperty Name
uv add ".\$wheel"
- name: Install wheels
run: python3 -m pip install $(python -c "import glob; print(glob.glob('dist/*.whl')[0])")
- run: magika --version
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/python-test-published-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ jobs:
- if: matrix.os != 'windows-latest' && matrix.python-version != '3.8' && matrix.python-version != '3.9'
name: Check that magika can be installed with uv
run: mkdir /tmp/test-uv && cd /tmp/test-uv && uv init && uv add magika && cd - && rm -rf /tmp/test-uv
- if: matrix.platform.runner == 'windows-latest'
name: Check that magika install with uv works on Windows
shell: pwsh
run: |
mkdir C:\test-uv
Copy-Item -Path dist\*.whl -Destination C:\test-uv
cd C:\test-uv
uv init
$wheel = Get-ChildItem -Filter *.whl | Select-Object -ExpandProperty Name
uv add ".\$wheel"
- name: Install magika with pip
run: python3 -m pip install magika
- run: python3 -c 'import magika; m = magika.Magika(); print(m)'
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/python-test-published-rc-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ jobs:
- if: matrix.os != 'windows-latest'
name: Check that magika -rc can be installed with uv
run: mkdir /tmp/test-uv && cd /tmp/test-uv && uv init && uv add --prerelease allow magika && cd - && rm -rf /tmp/test-uv
- if: matrix.platform.runner == 'windows-latest'
name: Check that magika -rc install with uv works on Windows
shell: pwsh
run: |
mkdir C:\test-uv
Copy-Item -Path dist\*.whl -Destination C:\test-uv
cd C:\test-uv
uv init
$wheel = Get-ChildItem -Filter *.whl | Select-Object -ExpandProperty Name
uv add --prerelease ".\$wheel"
- name: Install magika with pip
run: python3 -m pip install --pre magika
- run: python3 -c 'import magika; m = magika.Magika(); print(m); print(magika.__version__)'
Expand Down

0 comments on commit 372aa1e

Please sign in to comment.