Skip to content

build(deps): bump snok/install-poetry from 1.3.4 to 1.4.1 #189

build(deps): bump snok/install-poetry from 1.3.4 to 1.4.1

build(deps): bump snok/install-poetry from 1.3.4 to 1.4.1 #189

name: Python - build and test python package
on:
push:
branches:
- 'main'
paths:
- 'python/**'
- 'tests_data/**'
- '.github/workflows/**'
pull_request:
paths:
- 'python/**'
- 'tests_data/**'
- '.github/workflows/**'
permissions:
contents: read
jobs:
e2e-testing:
strategy:
matrix:
python-version: [ "3.8.x", "3.9.x", "3.10.x", "3.11.x", "3.12.x" ]
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # pin@v5
with:
python-version: '${{ matrix.python-version }}'
- name: Install uv
run: curl -LsSf https://astral.sh/uv/0.4.7/install.sh | sh
# It's OK to use the default python version and not the specified one
- name: Install all projects dependencies
working-directory: python
run: uv sync --all-extras --dev
- name: Build the python package
working-directory: python
run: uv run ./scripts/build_python_package.py
- name: List wheels
working-directory: python
run: python -c "import os; print('\n'.join(os.listdir('dist')))"
- name: Install the magika package
working-directory: python
run: python -m pip install $(python -c "import glob; print(glob.glob('dist/magika-*.whl')[0])")
shell: bash # Allows for cross-platform
- name: Run magika --version
working-directory: python
run: magika --version
shell: bash # Allows for cross-platform
- name: Run magika with tests_data
run: magika -r tests_data/basic
- name: Run "magika cli" quick tests
run: python ./python/scripts/run_quick_test_magika_cli.py
- name: Run "magika module" quick tests
run: python ./python/scripts/run_quick_test_magika_module.py